Home > Sample chapters > Microsoft Office > Access

Understanding Access 2013 Databases

Compacting, repairing, and encrypting a database

When you work with a database, after a period of time, the organization of the data becomes out of order, in terms of how the data is physically stored on the storage medium. Compacting the database reorganizes it so it will be more efficient to work with the data in the database.

If the database is shared by more than one user, then you need to ensure that no one else is using the database before you compact it. How often you need to compact a database depends on how often the database is used, and how many changes are made to the data. As an example, an individual’s Accounts database might only get compacted maybe once a year, but at the other extreme, a shared database with forty users could need compacting every couple of days.

With the idea of compacting and repairing a database, the repair function fixes something that has gone wrong with the structure of the files. Because Access is a shared file database, and certain parts of the database (notably indexes) get copied into a local computer’s memory, and users can switch off their computers, inconsistencies in the database indexing can occur. The repair operation fixes these inconsistencies. Again, deciding when to perform a repair operation depends upon how much data is changed and how many shared users are working in the database.

In this exercise, you’ll perform a repair operation in a database.

  1. Click File, Info, and then Compact & Repair Database. The database will then be compacted, repaired, and re-opened.

Encrypting with a password

If you need to protect your database, then Access offers an option that will both encrypt the data and secure the database with a password. The level of security you will obtain here is excellent, but it would not necessarily protect your data against a determined hacker. You should plan for using additional techniques to secure the data as appropriate to your security needs. This level of security will certainly prevent casual file browsers from opening or deciphering your data.

Database passwords and encryption are an excellent offering to provide an additional level of protection for certain files to augment network security.

In this exercise, you’ll encrypt a database with a password.

  1. Click File, Info, then Encrypt with Password. The following warning will then most likely appear:

  2. In order to apply or remove a password or encryption from a database, you need to open the database using a very specific technique.

  3. Click OK to close the message. Use the Open page to browse to or otherwise locate your database.

  4. When prompted to select your database, ensure that you use the Open option to Open Exclusive.

  5. Click File, Info, then Encrypt with Password. You will then be able to create a password and encrypt your database. Enter and verify your password. Click OK.

  6. You will also receive the following warning when you choose this option. Click OK.

  7. Return to the Info page, and click Decrypt Database.

  8. Enter your password to decrypt the database, then click OK.