Presentation is loading. Please wait.

Presentation is loading. Please wait.

Working with Multiple Tables in Microsoft Access The Access Workbench: Section Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.

Similar presentations


Presentation on theme: "Working with Multiple Tables in Microsoft Access The Access Workbench: Section Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition."— Presentation transcript:

1 Working with Multiple Tables in Microsoft Access The Access Workbench: Section Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition

2 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-2 Section Objectives  Learn how to use Microsoft Access to:  Illustrate modification problems  Create relationships between tables  Create multiple-table forms  Create multiple-table reports

3 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-3 Illustrating Modification Problems When a table contains data from multiple themes, it is subject to modification problems This topic was discussed in detail in Chapter 1 We will use an Access database to illustrate a modification problem The data is in a provided database named WMCRM-Combined-Data.mdb

4 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-4 CONTACT Data CustomerIDDateTypeRemarks 17/7/2005PhoneGeneral interest in a Gaea. 17/7/2005EmailSent general information. 17/12/2005PhoneSet up an appointment. 17/14/2005MeetingBought a HiStandard. 37/19/2005PhoneInterested in a SUHi, set up an appointment. 17/21/2005EmailSent a standard follow-up message. 47/27/2005PhoneInterested in a HiStandard, set up an appointment. 37/27/2005MeetingBought a SUHi. 48/2/2005MeetingTalked up to a HiLuxury. Customer bought one. 38/3/2005EmailSent a standard follow-up message. 48/10/2005EmailSent a standard follow-up message. 58/15/2005PhoneGeneral interest in a Gaea.

5 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-5 Security Warning Each time you open an existing database, the Security Warning dialog box will be displayed–as long as you are familiar with the database file, Click the Open button

6 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-6 Illustrating Modification Problems: The CUSTOMER_CONTACT Table

7 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-7 Illustrating Modification Problems: The Customer-Contact Data Input Form All fields from the CUSTOMER_CONTACT table appear on the form Form browsing buttons

8 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-8 Illustrating Modification Problems: The Wallingford Motors Customer Contact Report All contact data for each customer is grouped together and sorted by date

9 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-9 Illustrating Modification Problems: Form with the Updated Email Address The Email address has been updated Next record button

10 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-10 Illustrating Modification Problems: Updated Wallingford Motors Customer Contact Report A modification problem has occurred. Not all records were updated with the new email address, and the database records are now inconsistent.

11 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-11 Working with Multiple Tables: WMCRM Database Schema CUSTOMER (CustomerID, LastName, FirstName, Address, City, State, ZIP,Phone, Fax, Email) CONTACT (ContactID, CustomerID, Data, Type, Remarks) CustomerID in CONTACT must exist in CustomerID in CUSTOMER

12 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-12 Working with Multiple Tables: CONTACT Table Column Characteristics Column NameTypeKeyRequiredRemarks ContactIDAutoNumberPrimary KeyYesSurrogate Key CustomerIDNumberForeign KeyYesLong Integer DateDate/TimeNoYesShort Date TypeText (10)NoYesAllowed values are Phone, Fax, Email and Meeting RemarksMemoNo CONTACT

13 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-13 Working with Multiple Tables: Setting the Date Format Select the Short Date date format from the drop-down list

14 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-14 Working with Multiple Tables: Opening the Relationships Window Click Tools, then click Relationships…

15 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-15 Working with Multiple Tables: Adding Tables to the Relationships Window Select a table name, then click the Add button to add the table to the Relationships window

16 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-16 Working with Multiple Tables: Creating a Relationship To create a relationship between two tables: –In the Relationships window, drag a primary key column and drop it on top of the corresponding foreign key column

17 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-17 Working with Multiple Tables: The Table Objects in the Relationships Window The table objects have been enlarged and rearranged into the arrangement shown here Click, drag and drop the CUSTOMER CustomerID field onto the CONTACT CustomerID field

18 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-18 Working with Multiple Tables: The Edit Relationships Dialog Box Click the Enforce Referential Integrity check box, and then click the Create button to create the relationship

19 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-19 Working with Multiple Tables: The Completed Relationship The new relationship now appears in the Relationships window diagram—note that the line connects the related fields

20 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-20 Working with Multiple Tables: Data in the CONTACT Table

21 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-21 Working with Multiple Tables: The Completed Form for CUSTOMER and CONTACT Data Buttons for scrolling through the CONTACT records for this customer Buttons for scrolling through the CUSTOMER records

22 KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall AW-2-22 Working with Multiple Tables: The Wallingford Motors Customer Contacts Report Data for each customer List of contact data for each customer

23 Working with Multiple Tables in Microsoft Access End of Presentation on The Access Workbench: Section Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition


Download ppt "Working with Multiple Tables in Microsoft Access The Access Workbench: Section Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition."

Similar presentations


Ads by Google