Bulletproofing the Database Robert Grauer, Keith Mulbery, Maurie Wigman Lockley Copyright 2008 Pearson Prentice Hall. All rights reserved. 1
Objectives Encrypt and password protect a database Digitally sign and publish a database Save the database as an ACCDE file Analyze database documentation Analyze database performance Copyright 2008 Pearson Prentice Hall. All rights reserved. 2
Objectives Analyze database table structure and relationships Move data to a new database file Analyze/optimize object relationships in a database Create usable switchboards Copyright 2008 Pearson Prentice Hall. All rights reserved. 3
Data Protection Countermeasures Measures taken to protect your assets Access provides three countermeasure strategies Password Protection Ability to digitally sign database Creation of ACCDE file Copyright 2008 Pearson Prentice Hall. All rights reserved. 4
Password Protection Prevents unauthorized use of a file Need to follow certain guidelines Include combination of letters and numbers Six or eight characters long Combine uppercase, lowercase and symbols Last name and age Bad Smith18 Good crid8st! Combination of uppercase, lowercase, numbers, letters and symbols Copyright 2008 Pearson Prentice Hall. All rights reserved. 5
Assigning a Password in Access Prompt to Open database in Exclusive mode Open database for Exclusive Use Click to add password Access open dialog box Click arrow next to Open button Click Open Exclusive Use the Encrypt with Password command Database tools tab, database tools group Copyright 2008 Pearson Prentice Hall. All rights reserved. 6
Assigning a Password in Access Enter password Verify password Enter password in Password text box Reenter password in Verify text box If no match, you must re-verify Copyright 2008 Pearson Prentice Hall. All rights reserved. 7
Removing a Password Decrypt Password Enter Password Open in Exclusive mode Choose Decrypt database Database Tools group, Database Tools tab Enter the Password, click OK Copyright 2008 Pearson Prentice Hall. All rights reserved. 8
Digitally Sign and Publish a Database - Terminology Digital Signature Electronic Authentication Certification authority Commercial company that validates signatures Timestamp Encrypts date/time as part of the signature Copyright 2008 Pearson Prentice Hall. All rights reserved. 9
Creating a Digital Signature Package and Sign Click the Office button Click Publish Select Package and Sign Copyright 2008 Pearson Prentice Hall. All rights reserved. 10
Creating a Digital Signature Select a certificate Click OK Can also view existing certificate Database is packaged as ACCDE file Copyright 2008 Pearson Prentice Hall. All rights reserved. 11
ACCDE Files Previous Versions = MDE files Office 2007 = ACCDE files When saved as an ACCDE file Visual Basic code is removed Certain permissions are denied Use of database objects is prohibited Code and objects can be used They can not be modified Copyright 2008 Pearson Prentice Hall. All rights reserved. 12
ACCDE file An.accde file is the Office Access 2007 version of the.mde file in earlier versions of Access. It is a locked-down version of the original.accdb file. If the.accdb file contained any VBA code, only the compiled code is included in the.accde file - as a result, the VBA code cannot be viewed or modified by the user. The ACCDE file allows users to perform normal database operations, but prohibits creation of database objects and alterations to the designs of forms and reports. Copyright 2008 Pearson Prentice Hall. All rights reserved. 13
Benefits of an ACCDE File An ACCDE file has the following benefits: Reduces the size of the database. Optimizes memory usage and improves performance. Protects the VBA code from being viewed or edited while still allowing it to run. Allows users to update data and run reports without providing the entire database. Forms and Reports in an ACCDE File An ACCDE file does not allow you to: View, modify, or create forms, reports, or modules in Design view. Add, delete, or change references to databases or object libraries. Change code there is no source code. Import or export forms, reports, or code modules ACCDE File Requirements Before converting a database to an ACCDE file, you must password protect the database and save all references to other Access databases. Copyright 2008 Pearson Prentice Hall. All rights reserved. 14
Creating an ACCDE File Save As dialog box Make ACCDE file ACCDE extension Package and Sign a file OR Click Make ACCDE file Database Tools tab, database tools group Click Save Uses the same filename unless specified Copyright 2008 Pearson Prentice Hall. All rights reserved. 15
Caution: ACCDE Files Before converting to ACCDE format Make a back-up copy Conversion cannot be undone! Changes may need to be made later ACCDE file can t be modified Modify the backup and re-convert You must open in exclusive mode Copyright 2008 Pearson Prentice Hall. All rights reserved. 16
Database Analysis Tools Access provides three tools Database Documenter Performance Analyzer Table Analyzer Copyright 2008 Pearson Prentice Hall. All rights reserved. 17
The Database Documenter Database Documenter Creates documentation on all objects Create a data dictionary Itemizes and lists object attributes Click Database Documenter Database Tools tab, Analyze Group Copyright 2008 Pearson Prentice Hall. All rights reserved. 18
Using the Database Documenter Database Documenter dialog box Documenter Report Select objects to include in report Generate the report by clicking OK Copyright 2008 Pearson Prentice Hall. All rights reserved. 19
The Performance Analyzer Performance Analyzer Identifies design flaws Analyzes one or more objects Recommends optimizations Launched by clicking Analyze Performance Database Tools tab, Analyze Group Copyright 2008 Pearson Prentice Hall. All rights reserved. 20
Using the Performance Analyzer Select objects to analyze Results Select the objects to analyze View results in the Results Analysis pane Given three potential solution for problems Recommendations click icon to make changes Suggestion click the icon to make changes Idea You must implement manually Copyright 2008 Pearson Prentice Hall. All rights reserved. 21
Table Analyzer Examines how tables are structured Aids in normalization eliminating redundant data Three different levels of normalization 1NF (First Normal Form) Repeating groups eliminated 2NF Removes partial dependences 3NF Removes transitive dependencies Copyright 2008 Pearson Prentice Hall. All rights reserved. 22
Using the Table Analyzer Analyze Table Identify table to analyze Click Analyze Table Database Tools tab, Analyze Group Analyzer Wizard launches Identify table for analysis Make desired choices in Wizard Click Finish Copyright 2008 Pearson Prentice Hall. All rights reserved. 23
Splitting a Database One database Back-end Split Back-end Copy of original database only tables Front-end Copy of original database excluding tables Contains only tables Front-end Contains forms, queries, report no tables Copyright 2008 Pearson Prentice Hall. All rights reserved. 24
Database Splitter Database Splitter Creates front-end and back-end simultaneously Prompts to back up the database Prompts you to name both ends Copyright 2008 Pearson Prentice Hall. All rights reserved. 25
Understand Normalization Progression from one normal form to the next 1NF Promotes atomic fields Fields that contain only one value 2NF removes partial dependencies Depends on part of a composite key 3NF removes transitive dependencies Relationship problems between tables Copyright 2008 Pearson Prentice Hall. All rights reserved. 26
Switchboards Switchboard Allow non-access users to use Database Provide an attractive graphical interface Provides an intuitive environment Copyright 2008 Pearson Prentice Hall. All rights reserved. 27
Create a Switchboard Click Edit Use the Switchboard Manager Database Tools tab, Database Tools group Click Yes to create new switchboard Click Edit in Switchboard Manager Copyright 2008 Pearson Prentice Hall. All rights reserved. 28
Completing the Switchboard Manager Type text to appear in menu Choose how to how to open object Click Form arrow Select object to run Repeat process for additional items Copyright 2008 Pearson Prentice Hall. All rights reserved. 29