0% found this document useful (0 votes)
504 views

DB211 - Unit 3 Assignment A

The document provides instructions for an assignment to solve database design problems from a textbook. It asks the student to identify keys for three tables - TRUCK, BASE, and TYPE. It also asks the student to analyze the integrity of the tables and identify other design attributes like candidate keys and superkeys. The student provides their answers in red text for each problem.

Uploaded by

Tim Williams
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
504 views

DB211 - Unit 3 Assignment A

The document provides instructions for an assignment to solve database design problems from a textbook. It asks the student to identify keys for three tables - TRUCK, BASE, and TYPE. It also asks the student to analyze the integrity of the tables and identify other design attributes like candidate keys and superkeys. The student provides their answers in red text for each problem.

Uploaded by

Tim Williams
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DB211 Database Design ()

Instructor:
Unit 3, Assignment A
Student:
Assignment Instructions:
Solve Chapter 3 Problems 17-23 / Pages 101-102.
Please use Microsoft Visio for the ERD. For more on how to use Visio for the assignment, see Unit 3
Instructional Videos! Submit your assignment file using the link above (due Sunday of this unit, 40 points)
Assignment (Completed work and answers in RED text):

17. For each table, identify the primary key and the foreign key(s). If a table does not have a foreign key,
write None in the space provided.
TABLE
PRIMARY KEY

FOREIGN KEY(S)

TRUCK

TRUCK_NUM

BASE_CODE, TYPE_CODE

BASE

BASE_CODE

NONE

TYPE

TYPE_CODE

NONE

18. Do the tables exhibit entity integrity? Answer yes or no, and then explain your answer.
TABLE
ENTITY INTEGRITY EXPLANATION
TRUCK

YES

Each TRUCK_NUM value is a unique value and there


arent any NULL values. However, reference to the
BASE_CODE may produce a null value that may throw an
error. Additional NULL value checks will need to be
included.

BASE

YES

Each BASE_CODE value is a unique value and there


arent any NULL values.

TYPE

YES

Each TYPE_CODE value is a unique value and there


arent any NULL values.

19. Do the tables exhibit referential integrity? Answer yes or no, and then explain your answer. Write NA (Not
Applicable) if the table does not have a foreign key.
TABLE
REFERENTIAL INTEGRITY EXPLANATION
TRUCK

YES

Even though BASE_CODE has null values in it which


produces a NULL value, the values contained in it are
valid. Additional coding will be needed to pass over
any NULL values encountered. TYPE_CODE is
valid.

BASE

NA

NONE

TYPE

NA

NONE

20. Identify the TRUCK tables candidate key(s).

TRUCK_SERIAL_NUM and TRUCK_NUM, although TRUCK_NUM is really the Primary Key as


well.

21. For each table, identify a superkey and a secondary key.


TABLE SUPERKEY
SECONDARY KEY
TRUCK TRUCK_NUM, TRUCK_SERIAL_NUM

BASE_CODE, TYPE_CODE,
TRUCK_BUY_DATE

BASE

BASE_CODE

BASE_CITY, BASE_STATE,
BASE_AREA_CODE, BASE_PHONE,
BASE_MANAGER

TYPE

TYPE_CODE

TYPE_DESCRIPTION

22. Create the ERD for this database.

23. Create the relational diagram for this database.

You might also like