Microsoft Access
From Wikipedia, the free encyclopedia
Microsoft Office Access, previously known as Microsoft Access, is a pseudo-relational database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately. In mid-May 2010, the current version Microsoft Office Access 2010 was released by Microsoft in Office 2010; Microsoft Access 2007 was the prior version. Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other applications and databases:[1]
- Excel
- SharePoint lists
- text
- XML
- Outlook
- HTML
- dBase
- Paradox
- Lotus 1-2-3
- ODBC-compliant data containers, including:
Software developers and data architects can use Microsoft Access to develop application software, and "power users" can use it to build simple applications.[citation needed] Like other Office applications, Access is supported by Visual Basic for Applications, an object-oriented programming language that can reference a variety of objects including DAO (Data Access Objects), ActiveX Data Objects, and many other ActiveX components. Visual objects used in forms and reports expose their methods and properties in the VBA programming environment, and VBA code modules may declare and call Windows operating-system functions.
[edit] History
Microsoft released Access version 1.0 on 13 November 1992, and an Access 1.1 release in May 1993 to improve compatibility with other Microsoft products and include the Access Basic programming language.
Microsoft specified the minimum hardware requirements for Access v2.0 as: Microsoft Windows v3.1 with 4 MB of RAM required, 6 MB RAM recommended; 8 MB of available hard disk space required, 14 MB hard disk space recommended. The product shipped on seven 1.44 MB diskettes. The manual shows a 1993 copyright date.
Originally, the software worked well with relatively small databases but testing showed that some circumstances caused data corruption. For example, file sizes over 10 MB proved problematic (note that most hard disks held less than 500 MB at the time this was in wide use), and the Getting Started manual warns about a number of circumstances where obsolete device drivers or incorrect configurations can cause data loss. With the phasing out of Windows 95, 98 and ME, improved network reliability, and Microsoft having released 8 service packs for the Jet Database Engine, the reliability of Access databases has been improved and it supports both more data and a larger number of users.
With Office 95, Microsoft Access 7.0 (a.k.a "Access 95") became part of the Microsoft Office Professional Suite, joining Microsoft Excel, Word, and PowerPoint and transitioning from Access Basic to Visual Basic for Applications (VBA). Since then, Microsoft has released new versions of Microsoft Access with each release of Microsoft Office. This includes Access 97 (version 8.0), Access 2000 (version 9.0), Access 2002 (version 10.0), Access 2003 (version 11.5), and Access 2007 (version 12.0).
The native Access database format (the Jet MDB Database) has also evolved over the years. Formats include Access 1.0, 1.1, 2.0, 7.0, 97, 2000, 2002, 2007, and 2010. The most significant transition was from the Access 97 to the Access 2000 format; which is not backward compatible with earlier versions of Access. At the time of this writing, all newer versions of Access support the Access 2000 format. New features were added to the Access 2002 format which can be used by Access 2002, 2003, 2007, and 2010.
In Access 2007, a new database format was introduced: ACCDB. The ACCDB supports complex data types such as multivalue and attachment fields. These new field types are essentially recordsets in fields and allow the storage of multiple values in one field. With Access 2010, a new version of the ACCDB format supports hosting on a SharePoint 2010 server for exposure to the web.
Prior to the introduction of Access, the desktop database market was dominated by Borland with their Paradox and dBase programs, and FoxPro. Microsoft Access was the first mass market database program for Windows. With the purchase of FoxPro and incorporating its Rushmore query optimization routines into Access, Microsoft Access quickly became the dominant database for Windows effectively eliminating the competition which failed to transition from the MS-DOS world.[2]
Access's initial codename was Cirrus; the forms engine was called Ruby. This was before Visual Basic - Bill Gates saw the prototypes and decided that the BASIC language component should be co-developed as a separate expandable application, a project called Thunder. The two projects were developed separately as the underlying forms engines were incompatible with each other; however, these were merged together again after VBA.
Access was also the name of a communications program from Microsoft, meant to compete with ProComm and other programs. This proved a failure and was dropped.[3] Years later, Microsoft reused the name for its database software.
Microsoft Access is used to create simple database solutions. Access tables support a variety of standard field types, indices, and referential integrity. Access also includes a query interface, forms to display and enter data, and reports for printing. The underlying Jet database, which contains these objects, is multiuser-aware and handles record-locking and referential integrity including cascading, updates and deletes.
Simple tasks can be automated through macros with point-and-click options. Microsoft Access is very popular among non-programmers who can create visually pleasing and relatively advanced solutions on their own. It is also easy to place a database on a network and have multiple users share and update data without overwriting each other's work. Data is locked at the record level which is significantly different from Excel which locks the entire spreadsheet.
Microsoft offers a wide range of template databases within the program and for download from their website. These options are available upon starting Access and allow users to quickly use and enhance a database with pre-defined tables, queries, forms, reports, and macros. Popular templates include tracking contacts, assets, issues, events, projects, and tasks. Templates do not include VBA code.
Microsoft Access also offers the ability for programmers to create solutions using the programming language Visual Basic for Applications (VBA), which is similar to Visual Basic 6.0 (VB6) and used throughout the Microsoft Office programs such as Excel, Word, Outlook and PowerPoint. Most VB6 code including the use of Windows API calls, can be used in VBA. Power users and developers can extend basic end-user solutions to a professional solution with advanced automation, data validation, error trapping, and multi-user support.
Database solutions created entirely in Microsoft Access are well suited for individual and workgroup use across a network. The number of simultaneous users that can be supported depends on the amount of data, the tasks being performed, level of use, and application design. Generally accepted limits are solutions with 1 GB or less of data (Access supports up to 2 GB) and 50 or fewer simultaneous users. This is appropriate for workgroup and department solutions where the total number of users number a few hundred.
Applications that simply view data or have simple data entry can support considerably more users. Applications that run complex queries or analysis across large datasets would naturally require greater bandwidth and memory. Microsoft Access is designed to scale to support more data and users by linking to multiple Access databases or using a back-end database like Microsoft SQL Server. With the latter design, the amount of data and users can scale to enterprise-level solutions.
Microsoft Access' role in web development prior to version 2010 is limited. User interface features of Access, such as forms and reports, only work in Windows. The Microsoft Jet Database Engine, core to Access, can be accessed through technologies such as ODBC or OLE DB. The data (i.e., tables and queries) can be accessed by web-based applications developed in ASP.NET, PHP, or Java. Many ISPs offer Microsoft Access as a data storage option.
Access 2010 allows forms and reports to be published to web sites using what is called "access web services" that runs on Sharepoint software. These web based forms and reports run in any standard browser. The resulting web forms and reports when run in the browser don't require any ActiveX or add-ins like Silverlight. Thus, the resulting application can be used by running Firefox on Ubuntu Linux, for example.
In enterprise environments, Microsoft Access is particularly appropriate for meeting end-user database needs and for rapid application development. Microsoft Access is easy enough for end users to create their own queries, forms and reports, laying out fields and groupings, setting formats, etc. This frees up the professional developers to focus on more complex portions of the application.
A compiled MDE or ACCDE version of an Access database can be created to prevent users from getting to the design surfaces to modify module code, forms, and reports. This is often used in environments where end-user modifications are discouraged or the application's code should be kept private.
Microsoft offers a runtime version of Microsoft Access 2007 for download. This allows people to create Access solutions and distribute it for use by non-Microsoft Access owners (similar to the way DLLs or EXEs are distributed). Unlike the regular version of Access, the runtime version allows users to use the Access application but they cannot use its design surfaces.
Microsoft also offers developer extensions for download to help distribute Access applications, create database templates, and integrate source code control with Microsoft Visual SourceSafe.
[edit] Features
Users can create tables, queries, forms and reports, and connect them together with macros. Advanced users can use VBA to write rich solutions with advanced data manipulation and user control.
The original concept of Access was for end users to be able to "access" data from any source. Other uses include: the import and export of data to many formats including Excel, Outlook, ASCII, dBase, Paradox, FoxPro, SQL Server, Oracle, ODBC, etc. It also has the ability to link to data in its existing location and use it for viewing, querying, editing, and reporting. This allows the existing data to change and the Access platform to always use the latest data. It can perform heterogeneous joins between data sets stored across different platforms. Access is often used by people downloading data from enterprise level databases for manipulation, analysis, and reporting locally.
There is also the Jet Database format (MDB or ACCDB in Access 2007) which can contain the application and data in one file. This makes it very convenient to distribute the entire application to another user, who can run it in disconnected environments.
One of the benefits of Access from a programmer's perspective is its relative compatibility with SQL (structured query language) — queries can be viewed graphically or edited as SQL statements, and SQL statements can be used directly in Macros and VBA Modules to manipulate Access tables. Users can mix and use both VBA and "Macros" for programming forms and logic and offers object-oriented possibilities. VBA can also be included in queries.
Microsoft Access offers parameterized queries. These queries and Access tables can be referenced from other programs like VB6 and .NET through DAO or ADO. From Microsoft Access, VBA can reference parameterized stored procedures via ADO.
The desktop editions of Microsoft SQL Server can be used with Access as an alternative to the Jet Database Engine. This support started with MSDE (Microsoft SQL Server Desktop Engine), a scaled down version of Microsoft SQL Server 2000, and continues with the SQL Server Express versions of SQL Server 2005 and 2008.
Microsoft Access is a file server-based database. Unlike client–server relational database management systems (RDBMS), Microsoft Access does not implement database triggers, stored procedures, or transaction logging. Access 2010 includes table-level triggers and stored procedures built into the ACE data engine. Thus a Client-server database system is not a requirement for using stored procedures or table triggers with Access 2010. Tables, queries, Forms, reports and Macros can now be developed specifically for web base application in Access 2010. Integration with Microsoft SharePoint 2010 is also highly improved.
[edit] Development
Access stores all database tables, queries, forms, reports, macros, and modules in the Access Jet database as a single file.
For query development, Access offers a "Query Designer", a graphical user interface that allows users to build queries without knowledge of the SQL programming language. In the Query Designer, users can "show" the datasources of the query (which can be tables or queries) and select the fields they want returned by clicking and dragging them into the grid. One can set up joins by clicking and dragging fields in tables to fields in other tables. Access allows users to view and manipulate the SQL code if desired. Any Access table, including linked tables from different data sources, can be used in a query.
Access also supports the creation of "pass-through queries". These snippets of SQL code can address external data sources through the use of ODBC connections on the local machine. This enables users to interact with data stored outside the Access programme without using linked tables or Jet.[4] Users construct the pass-through queries using the SQL syntax supported by the external data source.
When developing reports that are linked to queries placing or moving items in the design view of the report, Access runs the linked query in the background on any placement or movement of an item in that Report. If the report is linked to a query that takes a long time to return records this means having to wait until the query has run before you can add/edit or move the next item in the report (this feature cannot be turned off).
Non-programmers can use the macro feature to automate simple tasks through a series of drop-down selections. Macros allow users to easily chain commands together such as running queries, importing or exporting data, opening and closing forms, previewing and printing reports, etc. Macros support basic logic (IF-conditions) and the ability to call other macros. Macros can also contain sub-macros which are similar to subroutines. In Access 2007 enhanced macros with the inclusion of error-handling and of support for temporary variables. Access 2007 also introduced embedded macros that are essentially properties of an object's event. This eliminated the need to store macros as individual objects. Macros however, are limited in their functionality by a lack of programming loops and of advanced coding logic. Most professional Access developers use the VBA programming language for a richer and more powerful development environment.
The programming language available in Access is, as in other products of the Microsoft Office suite, Microsoft Visual Basic for Applications, which is nearly identical to Visual Basic 6.0 (VB6). VBA code can be stored in modules and code behind forms and reports. Modules can also be classes.
To manipulate data in tables and queries in VBA, Microsoft provides two database access libraries of COM components:
- the Data Access Objects (DAO), which is included in Access and Windows and evolved to ACE in Microsoft Access 2007 for the ACCDE database format
- ActiveX Data Objects ActiveX Data Objects (ADO)
Beside DAO and ADO, developers can also use OLE DB and ODBC for developing native C/C++ programs for Access.[5] For ADPs and the direct manipulation of SQL Server data, ADO is required. DAO is most appropriate for managing data in Access/Jet databases, and the only way to manipulate the complex field types in ACCDB tables.
In the database container or navigation pane of Access 2007, the system automatically categorizes each object by type. Many Access developers use the Leszynski naming convention, though this is not universal; it is a programming convention, not a DBMS-enforced rule.[6] It is particularly helpful in VBA where references to object names may not indicate its data type (e.g. tbl for tables, qry for queries).
Developers deploy Microsoft Access most often for individual and workgroup projects (the Access 97 speed characterization was done for 32 users).[7] Since Access 97, and with Access 2003 and 2007, Microsoft Access and hardware have evolved significantly. Databases under 1 GB in size (which can now fit entirely in RAM) and 50 simultaneous users are well within the capabilities of Microsoft Access. Of course, performance depends on the database design and tasks. Disk-intensive work such as complex searching and querying take the most time.
As data from a Microsoft Access database can be cached in RAM, processing speed may substantially improve when there is only a single user or if the data is not changing. In the past, the effect of packet latency on the record-locking system caused Access databases to run slowly on a Virtual Private Network (VPN) or a Wide Area Network (WAN) against a Jet database. As of 2010[update] broadband connections have mitigated this issue. Performance can also be enhanced if a continuous connection is maintained to the back-end database throughout the session rather than opening and closing it for each table access. If Access Database performance over VPN or WAN suffers, then a client using Remote Desktop Protocol (such as Microsoft Terminal Services) can provide an effective solution. Access databases linked to SQL Server or to Access Data Projects work well[citation needed] over VPNs and WANs.
[edit] Split Database Architecture
Microsoft Access applications can adopt a split-database architecture. The database can be divided into a front-end database that contains the application objects (queries, forms, reports, macros, and modules), and is linked to tables stored in a back-end shared database containing the data. The "back-end" database can be stored in a location shared by many users, such as a file server. The "front-end" database is distributed to each user's desktop and linked to the shared database. Using this design, each user has a copy of Microsoft Access installed on their machine along with their application database. This reduces network traffic since the application is not retrieved for each use, and allows the front-end database to contain tables with data that is private to each user for storing settings or temporary data. This split-database design also allows development of the application independent of the data. When a new version is ready, the front-end database is replaced without impacting the data database. Microsoft Access has two built-in utilities, Database Splitter and Linked Table Manager, to facilitate this architecture.
Linked tables in Access use absolute paths rather than relative paths, so the development environment either has to have the same path as the production environment or a "dynamic-linker" routine can be written in VBA.
This is not an economical setup across slow networks, or in large organizations separated by great distances, as it will result in excessive lag to database users. SQL backend should be considered in these circumstances.
[edit] Access to SQL Server Upsizing (SQL as a backend)
To scale Access applications to enterprise or web solutions, one recommended[by whom?] technique involves migrating to Microsoft SQL Server or equivalent server database. A client–server design significantly reduces maintenance and increases security, availability, stability, and transaction logging.
Access includes an Upsizing Wizard that allows users to upsize their databases to Microsoft SQL Server, an ODBC client–server database. An additional solution, the SQL Server Migration Assistant for Access (SSMA), is also available for download from Microsoft.[8]
A variety of upsizing options are available.[9] After migrating the data and queries to SQL Server, the MDB/ACCDB Access database can be linked to the database. This is the easiest migration and most appropriate if the user does not have rights to create objects such as stored procedures on SQL Server. Retrieving data from linked tables is optimized to just the records needed, but this scenario operates less efficiently for multi-table joins that may require copying the whole table across the network.
Access databases can also be converted to Access Data Projects (ADP) which is tied directly to one SQL Server database. ADPs support the ability to directly create and modify SQL Server objects such as tables, views, stored procedures, views, and SQL Server constraints. The views and stored procedures can significantly reduce the network traffic for multi-table joins. Fortunately, SQL Server supports temporary tables and links to other data sources beyond the single SQL Server database.
Finally, some Access databases are completely replaced by another solution such as ASP.NET or Java once the data is converted.
In many cases, hybrid solutions are created where developers build web interfaces using ASP.NET, while keeping administrative or reporting features that don't need to be distributed to everyone and/or don't change often in Access for information workers to maintain.
While all Access data can migrate to SQL Server, some queries cannot migrate successfully. In some situations, you may need to translate VBA functions and user defined functions into TSQL or .NET functions / procedures. Crosstab queries can be migrated to SQL Server using the PIVOT command.
Microsoft Access has a reputation among IT professionals as not being as economical on server resources when running large query transactions, especially if users force-terminate the application on the client side. Transactions that were running might still be running on the SQL server unbeknownst to the end-user.[10]
[edit] Protection
Microsoft Access offers several ways to secure the application while allowing users to remain productive.
The most basic is a database password. Once entered, the user has full control of all the database objects. This is a relatively weak form of protection which can be easily cracked.
A higher level of protection is the use of workgroup security requiring a user name and password. Users and groups can be specified along with their rights at the object type or individual object level. This can be used to specify people with readonly or data entry rights but may be challenging to specify. A separate workgroup security file contains the settings which can be used to manage multiple databases. Workgroup security is not supported in the Access 2007 ACCDB database format, although Access 2007 still supports it for MDB databases.
Databases can also be encrypted. The ACCDB format offers significantly advanced encryption from previous versions [2].
Additionally, if the database design needs to be secured to prevent changes, Access databases can be locked/protected (and the source code compiled) by converting the database to a .MDE file. All changes to the VBA project (modules, forms, or reports) need to be made to the original MDB and then reconverted to MDE. In Access 2007, the ACCDB database is converted to an ACCDE file. Some tools are available for unlocking and "decompiling", although certain elements including original VBA comments and formatting are normally irretrievable.
[edit] File extensions
Microsoft Access saves information under the following file formats:
File format | Extension |
Access Project | .adp |
Access Blank Project Template | .adn |
Access Database (2007) | .accdb |
Access Database Runtime (2007) | .accdr |
Access Database Template (2007) | .accdt |
Access Database (2003 and earlier) | .mdb |
Access Database, used for addins (2,95,97), previously used for workgroups (2). | .mda |
Access Blank Database Template (2003 and earlier) | .mdn |
Access Add-in Data (2003 and earlier) | .mdt |
Access Workgroup, database for user-level security. | .mdw |
Access (SQL Server) detached database (2000) | .mdf |
Protected Access Database, with compiled VBA (2003 and earlier) | .mde |
Protected Access Database, with compiled VBA (2007) | .accde |
Windows Shortcut: Access Macro | .mam |
Windows Shortcut: Access Query | .maq |
Windows Shortcut: Access Report | .mar |
Windows Shortcut: Access Table | .mat |
Windows Shortcut: Access Form | .maf |
[edit] Versions
Date | Version | Version number | Supported OS | Office suite version |
1992 | Access 1.1 | 1 | Windows 3.0 |
|
1993 | Access 2.0 | 2.0 | Windows 3.1x | Office 4.3 Pro |
1995 | Access for Windows 95 | 7.0 | Windows 95 | Office 95 Professional |
1997 | Access 97 | 8.0 | Windows 9x, NT 3.51/4.0 | Office 97 Professional and Developer |
1999 | Access 2000 | 9.0 | Windows 9x, NT 4.0, 2000 | Office 2000 Professional, Premium and Developer |
2001 | Access 2002 | 10 | Windows 98, Me, 2000, XP | Office XP Professional and Developer |
2003 | Access 2003 | 11 | Windows 2000, XP, XP Professional x64, Vista | Office 2003 Professional and Professional Enterprise |
2007 | Access 2007 | 12 | Windows XP SP2, XP Professional x64, Vista | Office 2007 Professional, Professional Plus, Ultimate and Enterprise |
2010 | Access 2010 | 14 | Windows XP SP3, Vista, Windows 7 | Office 2010 Professional, Professional Academic and Professional Plus |
There are no Access versions between 2.0 and 7.0 because the Windows 95 version was launched with Word 7. All of the Office 95 products have OLE 2 capabilities, and Access 7 shows that it was compatible with Word 7.
[edit] See also
[edit] References
[edit] External links
This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.