Presentation is loading. Please wait.

Presentation is loading. Please wait.

XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.

Similar presentations


Presentation on theme: "XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table."— Presentation transcript:

1 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table Relationships Understand relational database objects and concepts Create table relationships Understand referential integrity

2 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 2 Understanding Relational Database Objects Users can view data in tables by:  Opening table  Creating other objects Four main objects in database  Tables  Queries  Forms  Reports

3 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 3 Tables Data in relational database stored in one or more tables View data in table  Open it and scroll through records three other main database objects used to display data normally

4 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 4 Queries Query  Question asked about data stored in database Query results  Look similar to table  Fields displayed in columns  Records displayed in rows

5 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 5 Queries (continued) Select query  Most commonly used query  Data selected from table on which query based Action query  Performs action on table  Select specific records in table and update them Crosstab query  Performs calculations on values in field and displays results in datasheet

6 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 6 Forms Used to view add delete, update and print records in database Based on table or query Interface more attractive than table datasheet Customize form’s appearance with instructions and command buttons Switchboard  Form displayed when database opened  Provides controlled method for users to open objects in database

7 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 7 Form Based on a Table

8 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 8 Reports Formatted presentation of data from table or query Created as printout or to be viewed on screen Data displayed by report usually based on query Dynamic  Reflect latest data from object Cannot be used to modify data

9 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 9 Accounts Receivable Report

10 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 10 Other Database Objects Page  Also called data access page  Web page  View and interact with data stored in access database  Html document stored outside database Macro  Set of instructions  Automate certain database tasks  Usually automates simple tasks

11 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 11 Other Database Objects (continued) Module  Contains instructions to automate database task  Written in Visual Basic for Applications (VBA)  Performs more sophisticated actions than macro

12 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 12 Understanding Relational Database Concepts Flat file database  Simple database  Contains single table of information Relational database  Contains multiple tables to store related information Common field  Field that appears in two or more tables and contains identical data to relate tables  Primary key in first table  Foreign key in second table

13 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 13 Creating Table Relationships Take advantage of interrelated objects Goal in good database design  Create separate tables for each entity  Ensure each table has primary key  Use common field to relate tables Relate two (or more) tables  Query them as though they are one big table Join  Specifies relationship between tables and properties of relationship

14 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 14 One-to-Many Relationships Abbreviated as 1:M One record in first table matches zero one or many records in related table Primary table  One side Related table  Many side

15 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 15 One-to-Many Relationship Between Customers and Prescriptions

16 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 16 One-to-One Relationships Abbreviated as 1:1 Exists when each record in one table matches exactly one record in related table

17 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 17 One-to-One Relationship Between Physical and Billing Addresses

18 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 18 Many-to-Many Relationships Abbreviated as M:N Each record in first table matches many records in second table Each record in second table matches many records in first table Junction table

19 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 19 Many-to-Many Relationship Between Employees and Classes

20 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 20 Understanding Referential Integrity Null value  Field does not contain any value Entity integrity  Guarantee that there are no duplicate records in table  Each record unique  No primary key field contains null values Referential integrity  If foreign key in one table matches primary key in second table  Values in foreign key must match values in primary key

21 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 21 Understanding Referential Integrity (continued) When database does not enforce referential integrity  Problems occur that lead to inaccurate and inconsistent data Orphaned  No longer match between primary key in primary table and foreign keys in related table

22 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 22 Referential Integrity Errors

23 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 23 Overriding Referential Integrity Might want to override referential integrity  Intentionally change primary key  Delete parent record Cascade updates  Change primary key value so that DBMS automatically updates appropriate foreign key values in related table Cascade deletes

24 XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 24 Level 2 Summary Main database objects:  Table  Query  Form  Report Relationship types:  One-to-many  One-to-one  Many-to-many


Download ppt "XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table."

Similar presentations


Ads by Google