Activity 5.1: Identifying Keys in the Logical Model In this activity, you will identify primary, foreign, and if necessary composite keys in the logical data model for Ferguson and Bard
Trang 1Activity 5.1: Identifying Keys in the
Logical Model
In this activity, you will identify primary, foreign, and (if necessary) composite keys in the logical data model for Ferguson and Bardell, Inc
Objectives
After completing this activity, you will be able to:
! Identify primary, foreign, and composite keys in a logical data model
! Select a primary and foreign key type that is appropriate for a given entity
Before You Begin
This activity will be completed individually, with a class discussion to follow
Time to complete this activity: 20 minutes
Trang 222 Activity 5.1: Identifying Keys in the Logical Model
Exercise 1:
Identifying Keys
In this exercise, you will identify primary, foreign, and composite keys for a logical data model based on the Ferguson and Bardell, Inc case study
! Specify the keys in a logical data model
1 Review the ER diagram on the next page
2 Identify the areas of the ER diagram for which keys are necessary
3 Write the keys in the space provided on the ER diagram
4 Label each key as necessary, using the following syntax:
Primary Key: (PK) Foreign Key: (FK) Composite Key: (CK) Draw a line under the attributes used to define the composite key, and then label their types as Primary or Foreign
Next, you will discuss your answers with the class
Trang 3Activity 5.1: Identifying Keys in the Logical Model 23
Name
Address
SSN
Type
Salary
BillableRate
Employee
EmployeeFirstName EmployeeLastName ClientName ClientLocation Date
Expenses TotalHours BillableHours Description
Timesheet
ClientName ClientAddress ClientCity ClientState ClientZip Date Amount Work Description Invoice
Name Address City State Zip
Client
Make
Model
VIN
Year
BeginMileage
EndMileage
MaintenanceCost1
MaintenanceDesc1
MaintenanceDate1
MaintenanceMiles1
MaintenanceCost2
MaintenanceDesc2
MaintenanceDate2
MaintenanceMiles2
MaintenanceCost3
MaintenanceDesc3
MaintenanceDate3
MaintenanceMiles3
Vehicle
Is Issued
Completes
Is Made From
Is Sent To Contracts With
JobDesc TaskDesc
Job Bills Time To
Client Employee StartDate EndDate Description Contract
Purchases
1
1 ∞
1
0 ∞
1
1 ∞
0 ∞
1 ∞
1
1 ∞
0 ∞
0 ∞
Trang 4THIS PAGE INTENTIONALLY LEFT BLANK