Tải bản đầy đủ (.pdf) (4 trang)

Tài liệu Activity 7.2: Determining Data Integrity Implementations doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (117.54 KB, 4 trang )


Activity 7.2: Determining Data
Integrity Implementations
In this activity, you will evaluate a physical design for the Ferguson and
Bardell, Inc. case study and then determine areas within the physical design
where data integrity requirements and business rules should be implemented
with the methods presented in Module 7, “Implementing Data Integrity.”
Objectives
After completing this activity, you will be able to:
!
Identify areas where data integrity should be enforced.
!
Choose a method for implementing business rules and data integrity
requirements.

Before You Begin
This activity will take place in small groups, with a class discussion following
the activity.
Prerequisite
To complete this activity, you will need the:
!
Completion of Activity 7.1.

Time to complete this activity: 30 minutes
44 Activity 7.2: Determining Data Integrity Implementations







Exercise 1:
Determining Integrity Implementations
In this exercise, you will examine the physical design provided, determine areas
in the design where data integrity should be enforced, and determine how it
should be enforced.
!
Identify areas where data integrity should be enforced
1. Join the group to which the instructor assigned you.
2. With your group, study the physical data design on the next page.
3. Based on the business rules and data integrity requirements specified in
Activity 7.1, identify how the data integrity requirement can be
implemented for each rule in the following table.
4. Supply a reason for each answer in the table.

Data integrity rule Implementation Description

Timesheet must contain an
existing employee, client, job,
and task.

Contract cannot exist without
a valid employee and client
relation.

Each job entry must have an
associated task assignment.

Job cannot be created without
a default task.


Valid date must be specified
for each timesheet and for
each time entry that a
consultant makes.

All consultants’ expenses
must be formatted correctly,
and they must be a positive
amount.

Employee billing rate must be
updated.


When you have finished, you will discuss your findings with the class.
Activity 7.2: Determining Data Integrity Implementations 45



TypeID (FK) (N)Int
FirstName VChar 25
MiddleInitial VChar 2
LastName VChar 25
Address1 VChar 40
Address2 VChar 40
City VChar 30
State VChar 20
Zip VChar 10
SSN VChar 9
E-Mail VChar 50

Salary Currency
BillableRate Currency
EmployeeID (PK) Int
Employee
ClientID (FK) (N)DInt
EmployeeID (FK) (N)Int
JobID (FK) (N)DInt
TaskID(FK) (N)DInt
Date Date
Expenses Currency
TotalHours Float
BillableHours Float
Description VChar 255
TimesheetID (PK) DInt
Timesheet
ClientID (FK) (N)DInt
TimesheetID (FK) (N)DInt
Date Date
Amount Currency
Work Description VChar 255
InvoiceID (PK) DInt
Invoice
Name VChar 60
Address1 VChar 40
Address2 VChar 40
City VChar 30
State VChar 20
Zip VChar 10
ClientID (PK) DInt
Client

EmployeeID (FK) Int
Make VChar 100
Model VChar 100
VIN VChar 30
Year Date
BeginMileage Int
EndMileage Int
VehicleID (PK) Int
Vehicle
Is Issued
1
Completes
1
1

∞∞

Is Sent To
1
0

∞∞

1
1

∞∞

JobDesc VChar 255
JobID (PK) DInt

Job
TaskID (FK) DInt
JobID (FK) DInt
JobTask_Link
Has
Bills Time To
VehicleID (FK) (N)Int
MaintenanceCost Currency
MaintenanceDesc VChar 255
MaintenanceDate Date
MaintenanceMiles Int
MaintID (PK) Int
VehicleMaint
Can Have
0

∞∞

1
1
1

∞∞

TypeDesc VChar 255
TypeID (PK) Int
EmployeeType
Is Classified As
1
1

1

∞∞

1
1

∞∞

ClientID(FK) DInt
EmployeeID(FK) Int
StartDate Date
EndDate Date
Description VChar 255
ContractID(PK) DInt
Contract
Purchases
1
1
0

∞∞

Is Made From
Contracts With
TaskDesc VChar 255
TaskID (PK) DInt
Task
Has
1


∞∞

1
0

∞∞

VehicleID (FK) Int
EmployeeID(FK) Int
Vehicle_Link
Can Be Assigned To
0

∞∞

1
Bills Time To
1

∞∞

1





THIS PAGE INTENTIONALLY LEFT BLANK


×