- INTRODUCTION TO ACCESS POWERPOINT SLIDES DUNCAN BRAND
- Queries
- Display selected fields and records from a table
- Sort Records
- Perform calculations
- Generate data for forms, reports, and other queries
- Update data in the tables in a database
- Find and display data from two or more tables
- Defining Table Relationships
- Use a common field to relate one table to another.
- This is called performing a JOIN.
- Our example uses the CustomerNum field to join the Customer and Order tables.
- One-to-Many Relationship
- A one-to many relationship exists when one record in the first table matches zero, one, or many records in the second table; and
- When one record in the second table matches exactly one record in the first table.
- Primary Table
- The primary table is the "one" table in the one-to-many relationship.
- In our example, Customer table is the primary table.
- Related Table
- The related table is the "many" table. In our example, Order table is the secondary table.
- Referential Integrity – A set of rules that Access enforces to maintain consistency between related tables when you update a database. The rules are as follows:
- When you add a record to a related table, a matching record must already exist in the primary table.
- If you attempt to change the value of the primary key in the primary table, Access prevents this change if matching records exist in a related table.
- However, if you choose the Cascade Updates option, Access permits the change in value to the primary key and changes the appropriate foreign key values in the related table.
- When you delete a record in the primary table, access prevents the deletion if matching records exist in a related table.
- However, if you choose the Cascade Deletes option, Access deletes the record in the primary table and all records in related tables that have matching foreign key values.
- The "And" Logical Operator
- When you want to select a record only if two or more conditions exist, you need to use the AND Logical Operator.
- The "Or" Logical operator
- When you want to select a record if either two or more conditions exists, you need to use the OR Logical Operator.