510 likes | 650 Views
Database Tools. Lesson 15. Objectives. Maintaining a Database.
E N D
Database Tools Lesson 15
Maintaining a Database • You can maintain some important aspects of a database by using the commands on the Info tab and Save & Publish tab on the File tab in Backstage view. Though they might not seem as important as the actual data in your database, the commands on these tabs allow you to provide protection of all the data in the file, and that is important. By using the commands on the Info tab, you can compact and repair your database, set database properties, and protect your database by using encryption. The commands on the Save & Publish tab let you save your database in a previous file format and back up your database.
Backing Up a Database • After all the work you have put into a database, you start to depend on being able to access and update the data and the information in it on a regular basis. To protect your work, it is a good idea to back up a database. A backup is a copy of a file. It is a good idea to create backup files of all your databases and continue to back them up on a regular basis. Essentially, you are making another copy of the database that you can store on your computer, on a network drive, or in another safe location to prevent the loss of your data. In this exercise, you back up a database.
Backing Up a Database • You can store a backup copy in the same place as your original file, such as on your computer. However, if something happened to your computer, both files would be affected. A better solution is to save a backup copy to a network drive or removable media that is stored in a different physical location. For example, some companies that maintain sensitive client data have elaborate backup processes in place to store backup copies on computers or other media off premises in another part of the city or in another part of the country. If an entire office building is destroyed by fire or a city is involved in a natural disaster, the backup files containing client data are safe in another location. It is a good idea to consider the appropriate precautions needed for even a small company’s data.
Backing Up a Database • When backing up a database, Access automatically adds the date to the filename. You can keep this filename as an identifier for the backup file or change the filename to something else. Just keep in mind that you need a new name or location so that you aren’t just overwriting your original file. In the Save In box, choose the location where you want to save the file.
Step-by-Step: Back Up a Database • Before you begin these steps, be sure to turn on and/or log on to your computer and LAUNCH Access. • OPEN Fabrikam from the data files for this lesson. • Save the database as FabrikamXXX (where XXX is your initials). • Click the File tab and click Save & Publish. The Save & Publish menu appears, as shown in on the next slide.
Step-by-Step: Back Up a Database • In the Advanced category, click Back Up Database and then click the Save As button.The Save As dialog box appears, as shown on the next slide. Notice that Access automatically adds the current date to the end of the filename.
Step-by-Step: Back Up a Database • Click the Save button to accept the generated filename. • LEAVE the database open to use in the next exercise.
Saving as a Previous Version • Access 2010 allows you to save a database in a previous Access file format so that those using earlier versions of the software can use the database. However, some features of Access 2010 cannot be converted to a file format prior to Access 2007. Access will alert you when this is the case, and you can always remove that feature in order to save the database as a previous version. Before you can save a database in a previous file format, you should open the database, but make sure all objects are closed. In this exercise, you save an Access 2010 database as a previous version so a user who has an earlier version of Access can open your document without any difficulty.
Saving as a Previous Version • When you save a new, blank database in Microsoft Office Access 2010, you are prompted to give it a filename. Although you may have created the database in Access 2010, it is saved in the Access 2007 format by default, which gives it the .accdb extension. The Office Access 2007 format is not readable by earlier versions of Access. If you need to share a database with others using earlier versions of the software, the Save As command allows you to save the database in the Access 2000 format or the Access 2002–2003 format, both of which have the extension .mdb. When you use the Save As command to save a database in an earlier format, it preserves the original database file in its format and creates a copy in the format you choose.
Step-by-Step: Save as a Previous Version • USEthe database open from the previous exercise. • Click the File tab and then click Save & Publish. The Save & Publish menu appears. • In the Database File Types category, click Access 2002–2003 Database and then click the Save As button. The Save As dialog box appears, as shown at right. Notice that Micro-soft Access Database (2002–2003) is displayed in the Save as type box.
Step-by-Step: Save as a Previous Version • Key Fabrikam2002–2003 in the file name box. • Click the Save button. Notice the filename and format change is displayed in the title bar, as shown below. • LEAVE the database open to use in the next exercise.
Compacting and Repairing a Database • The Compact and Repair command on the Info tab in Backstage view, optimizes files and fixes minor problems in the file structure that may result from normal, everyday use of a database file. In this exercise, you compact and repair a database. • As records or objects in a database are deleted, the empty space within the file might not be replaced right away, leaving the file fragmented or with large empty spaces within the file structure. In databases with many records and objects, these issues can affect the database’s performance over time. In the same way, minor errors can occur in any file, especially when it is shared by many different users on a network drive. Using the Compact and Repair command on a regular basis will help to optimize the file and repair minor problems before they become major ones.
Step-by-Step: Compact and Repair a Database • USEthe database open from the previous exercise. • Click the File tab and then click the Info tab. Select Compact &Repair on the Info tab menu that appears, as shown at right. Access compacts and repairs the database. • LEAVE the database open to use in the next exercise.
Setting Database Properties • Database properties are details about a file that describe or identify it. Using database properties makes it easier to organize and identify databases later. Some properties can be specified by you and some are automatically updated by Access. You can search to find files that contain certain properties, such as keywords, file size, or creation date. Standard properties are those such as author, title, and subject that are associated with a document by default. • In this exercise, you set database properties that will help you identify and organize it later. • The table on the next slide describes each Standard property in the Summary tab of the Properties dialog box. These properties can all be changed by the user; however, some properties in the General, Statistics, and Contents tabs—such as the file size and date the document was created or updated—are Automatically Updated Properties that are updated by Access and cannot be changed.
Step-by-Step: Set Database Properties • USEthe database open from the previous exercise. • Click the File tab and then click the Info tab. On the Info menu that appears, click the View and edit database propertieslink. The Fabrikam.accdb Properties dialog box appears, as shownat right. • Key Fall Collection in the Title box. • Key preview in the Subject box. • Select the text in the Author box and key Your Name.
Step-by-Step: Set Database Properties • Key Britta Simon in the Manager box. • Key Fabrikam, Inc. in the Company box • Click the General tab. Notice that this tab displays the file type, location, and size as well as the dates the file was created, modified, and accessed. • Click the Contents tab to view a list of the types of objects within the database file. • Click OK. • LEAVE the database open to use in the next exercise.
Encrypting a Database • Encryptinga database means to scramble the data in a way that can only be reconverted by an authorized user who has the password. When you use a database password to encrypt a database, you make all data unreadable by other tools and you force users to enter a password to use the database. Encrypting a database can provide security for sensitive data. You can use the decrypt database command to change the password on a regular basis or to remove it. • When you open an encrypted database, the Password Required dialog box appears where you key the password. Passwords are case sensitive, meaning you can use uppercase and lowercase letters as well as numbers and symbols, but you must enter them exactly as they were entered when the password was set in order for there to be a match. It is very important for you to remember your password, because if you forget it Microsoft cannot retrieve it for you. Write down the password and store it in a safe location.
Encrypting and Decrypting a Database • To encrypt a database, you first need to open it in Exclusive mode. Decrypting a database is removing the password from a file that has been encrypted. • In this exercise you help secure a database by encrypting it, and then decrypting it. • If you want to remove a password, open the database in Exclusive mode, then click the Decrypt Database button from the Database Tools group and key the password in the Unset Database Password dialog box exactly as it was entered to encrypt the database.
Step-by-Step: Encrypt and Decrypt a Database • USEthe database open from the previous exercise. • Click the File tab and then click the Info tab. On the Info menu that appears, click the Encrypt with Password button. The Microsoft Office Access message box appears saying you must open the database in Exclusive mode, as shown below. • Click OK. • CLOSEthe database but don’t close Access.
Step-by-Step: Encrypt and Decrypt a Database • Click the Open command on the Filetab. The Opendialog box appears. • Navigate to the data files for this lesson and select Fabrikam (or FabrikamXXX, if you saved it with this name). Make sure you choose the Fabrikam database file that has an ‘A’ as part of the icon, indicating it’s an Access 2007 file type.
Step-by-Step: Encrypt and Decrypt a Database • Click the down arrow on the Open button and select Open Exclusive from the menu, as shown below. The Fabrikamdatabase file opens in exclusive mode.
Step-by-Step: Encrypt and Decrypt a Database • On the Filetab, on the Info tab menu, click the Encrypt with Passwordbutton. The Set Database Password dialog box appears, as shown above. • Key $Fabrikam09fc in the Password box. • Key $Fabrikam09fc in the Verify box. • Click OK.If you get another message box informing you that an option will be ignored, click OK. The database is now encrypted with a password.
Step-by-Step: Encrypt and Decrypt a Database • CLOSEthe database. • OPENthe database in Exclusive mode again. The Password Required dialog box appears, as shown above. • Key $Fabrikam09fc and click OK. The database opens. • On the Filetab, on the Info tab menu, click the Decrypt Database button. (If you hadn’t opened the database in Exclusive mode, you would get a message prompting you to do so.) The Unset Database Password dialog box appears.
Step-by-Step: Encrypt and Decrypt a Database • Key $Fabrikam09fc and click OK. • CLOSEthe database. • OPENthe database in regular mode. Notice that a password is no longer required to open the file. • CLOSEthe database. • LEAVE Access open to use in the next exercise.
Configuring Database Options • The Access Options dialog box provides many ways to customize Access. From changing popular options to specific or advanced options for databases, Access offers a number of ways to customize your copy of Access. Through the Access Options dialog box, you can enable error checking, show/hide the Navigation pane, and select a startup display form. • If you want a form to be displayed automatically when you open a database, the Display Form menu lets you choose from available forms in the database. You can choose none if you do not wish to display a form.
Configuring Database Options • The Display Navigation Pane option is turned on by default, but if you don’t want the Navigation pane to be displayed when you open your database, click the Display Navigation Pane check box to remove the check mark. You must close and reopen the current database for these settings to take effect. • Enable error checking, located in the Object Designers options, is another feature you can change. Error checking is on by default, but you can clear the check box to disable all types of error checking in forms and reports. For example, Access places error indicators in controls that encounter one or more types of errors. The indicators appear as triangles in the upper-left or upper-right corner of the control, depending on text direction. The default indicator color is green, but you can change that to another color if you choose.
Configuring Database Options • The Access Options dialog box lets you customize certain aspects of Access and your databases. The Access Options dialog box has 11 sections of customizable options, including General, Current Database, Datasheet, Object Designers, Proofing, and Language. In this exercise, you use the Access Options dialog box to display a form and hide the Navigation pane.
Step-by-Step: Configure Database Options • OPEN FabrikamInc from the data files for this lesson. • Save the database as FabrikamIncXXX (where XXX is your initials). • Click the File tab and click the Options button. The Access Options dialog box appears. • Click the Current Databasebutton on the left to display the Current Database section of the Access Options dialog box, as shown at right.
Step-by-Step: Configure Database Options • In the Application Options section, click the Display Form down arrow and select Showroom Contact Form from the menu. • In the Navigation section, notice that the Display Navigation Pane is turned on by default. • Click the Display Navigation Pane check box to remove the check mark and click OK. A Microsoft Access dialog box appears, as shown below, saying you need to close and reopen the database for the changes to take effect. • Click OK. • CLOSE the database.
Step-by-Step: Configure Database Options • Open the FabrikamIncXXX database. Notice that the Navigation pane is not visible and the Showroom Contact Form is displayed, as shown below.
Step-by-Step: Configure Database Options • Click the File tab and click the Options button. • Click the Current Database button on the left, if it’s not already selected. • In the Application Options section, click the Display Form down arrow and select None from the menu. • In the Navigation section, click the Display Navigation Pane check box to insert a check mark. • Click the Navigation Options button. The Navigation Options dialog box appears. Notice the grouping and display options available and click Cancel. • Click the Object Designers button on the left.
Step-by-Step: Configure Database Options • Scroll to the bottom of the window to see the Error checking section. The Enable Error Checking options are turned on by default. • Click OK. The Microsoft Access dialog box appears again. • Click OK. • CLOSEthe database. • OPENthe FabrikamIncXXX database. Notice the Navigation pane is displayed and the form is not. • LEAVE the report open to use in the next exercise.
Software Orientation • The Database Tools tab on the Ribbon contains advanced commands for maintaining documents. • Use the figure below as a reference throughout this lesson as well as the rest of this book.
Using Database Tools • The Database Tools tab has advanced commands for maintaining databases. • You can do such things as identify object dependencies, create object reports with the Database Documenter, and split a database by using this tab.
Identifying Object Dependencies • Object dependencies describe how objects in a database rely on other components to function properly. The Object Dependencies task pane helps you manage a database by displaying how all its components interact. This can be helpful if you want to delete a table or form. You will be able to see which other objects may also need to be changed so that they will still function without the deleted table. In this exercise, you identify object dependencies. • The Object Dependencies task pane displays how database objects, such as tables or forms, use other objects. This process helps keep databases running smoothly by preventing errors that could result when changes or deletions are made to objects in a database. The Object Dependencies task pane works only for tables, forms, queries, and reports in an Access database.
Step-by-Step: Identify Object Dependencies • USEthe database open from the previous exercise. • Click the Product Placements Table in the Navigation pane to select it. • On the Database Tools tab, in the Analyze group, click the Object Dependencies button. The Object Dependencies pane displays dependency information for the selected table, as shown on the next slide. Notice that the Objects that depend on me radio button is selected. • Click the Objects that I depend on radio button. Notice the changes in the Reports section.
Step-by-Step: Identify Object Dependencies • Click the Objects that depend on me radio button. Click the plus sign (+) beside the Showroom Contact table to see the tables and forms that depend on the Showroom Contact table. • Click the Showroom Contact link to display it in Design view where you could make any necessary changes regarding dependencies. • CLOSEthe Object Dependencies pane. • LEAVE the database open to use in the next exercise.
Using the Database Documenter • The Database Documenter provides detailed information about a database and presents it as a report that can be printed. Use the Database Documenter when you need to have a printed record of this information, such as for record-keeping purposes or as insurance in case you have to re-create the database or object. In this exercise, you use the Database Documenter to create a report about the objects included in the database. • The Database Documenter creates a report that shows details, or definitions, about a selected object and opens it in Print Preview. You can view the properties for a form as well as properties for each section of the form and each label, button, or control on the form. The Documenter dialog box contains tabs for each type of object, as well as a tab that displays all objects. Select the object whose definitions you want to view or print. The Options button lets you further specify the features of the object for which you want to view the definitions.
Step-by-Step: Use the Database Documenter • USE the database open from the previous exercise. • On the Database Tools tab, in the Relationships group, click the Database Documenter button. The Documenter dialog box appears, as shown below.
Step-by-Step: Use the Database Documenter • Click the All Object Typestab. • Click the Tables tab. • Click the Showroom Contactcheck box in the Tables list. • Click the Options button. ThePrint Table Definition dialog box appears, as shown at right. • Click OK to close the Print Table Definition dialog box.
Step-by-Step: Use the Database Documenter • Click OK to closethe Documenter dialog box. If you receive a message box asking you to close the table click OK. The Object Definition report appears in Print Preview. • Click the Zoom button in the Zoom group to view the report, as shown atright. At this point, you could print the report or make any changes to the layout and then print it.
Step-by-Step: Use the Database Documenter • Click the Next Page button on the record navigation bar to move to page 4. Notice the relationship diagram included in the report. • Click the Close Print Preview button. • LEAVE the database open to use in the next exercise.
Splitting a Database • It can be difficult for many people to use the data in a database at the same time. Synchronizing data can be difficult and time consuming. • To avoid slowing down the network because of constant changes being made to a database, the Database Splitter wizard can split the database in two files: one that contains the tables, called the back-end file; and one that contains the queries, forms, reports, and other objects created from the tables, called the front-end file. • Users who need to access the data can customize their own forms, reports, pages, and other objects while maintaining a single source of data on the network. It is a good idea to back up the database before splitting it. • In this exercise, you use the Database Splitter wizard to split a database.
Step-by-Step: Split a Database • USEthe database open from the previous exercise. • On the Database Tools tab, in the Move Data group, click the Access Databasebutton. The Database Splitter Wizard appears, as shown at right.
Step-by-Step: Split a Database • Click the Split Database button. The Create Back-end Database dialog box appears, as shown below.
Step-by-Step: Split a Database • Navigate to the location where you want to save the back-end file and click Split. After a few moments, the Database Splitter dialog box appears, as shown below. • ClickOK. • CLOSEthe database. • OPEN FabrikamXXX_be. Notice that it contains only the tables for the database. • CLOSEthe database. • CLOSE Access.