Database Doc
100 points
Please type your answers on this document and submit this document.
1. Suppose that you are using the Database composed of the two tables shown in the following
figure. Use these tables to answer part A,B,C (40 points)
Theater Database Tables
Table name: DIRECTOR
Table name: PLAY
A. Identify the primary keys for each table. ( 15 points )
DIR_NUM, PLAY_CODE
B. Identify the foreign key. ( 15 points )
DIR_NUM
C. What is the relationship between these 2 tables? (10 points)
2. Use the following Tables to answer questions A-C . ( 60 Total points )
PRODUCT and vendor Database Tables
Table name: PRODUCT
Table name: VENDOR
A. 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 assigned space. ( 20 points )
|
TABLE |
PRIMARY KEY |
FOREIGN KEY(S) |
|
PRODUCT
|
|
|
|
VENDOR |
|
|
B. Do the tables exhibit entity integrity? Answer Yes or No, and then explain
your answer. ( 20 points )
|
TABLE |
ENTITY INTEGRITY? Type Yes or No here |
EXPLANATION Explain the reason here |
|
PRODUCT |
|
|
|
VENDOR |
|
|
C. 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. ( 20 points )
|
TABLE |
REFERENTIAL INTEGRITY |
EXPLANATION |
|
PRODUCT |
|
|
|
VENDOR |
|
|
1