Reference no: EM13861018
Problem 1: Create a Crow's Foot ERD to include the following business rules for the ProdCocompany:
a. Each sales representative writes many invoices.
b. Each invoice is written by one sales representative.
c. Each sales representative is assigned to one department.
d. Each department has many sales representatives.
e. Each customer can generate many invoices.
f. Each invoice is generated by one customer
Problem 2: Write the business rules that are reflected in the ERD shown in Figure. (Note that the ERD reflects some simplifying assumptions. For example, each book is written by only one author. Also, remember that the ERD is always read from the "1" to the "M" side, regardless of the orientation of the ERD components.)
Problem 3:
The database tables
Table name: TRUCK
Primary Key:TRUCK_NUM
Foreign Key:BASE_CODE, TYPE_CODE
TRUCK_NUM |
BASE_CODE |
TYPE_CODE |
TRUCK_MILES |
TRUCK_BUY_DATE |
TRUCK_SERIAL_NUM |
1001 |
501 |
1 |
32123.5 |
23-Sep-07 |
AA-322-1221-VV11 |
1002 |
502 |
1 |
76964.3 |
5-Feb-06 |
AC-342-22134-023 |
1003 |
501 |
2 |
12346.6 |
11-Nov-07 |
AC-445-78656-Z99 |
1004 |
|
1 |
2994.3 |
6-Jan-07 |
WQ-112-23144-T34 |
1005 |
503 |
2 |
45643.1 |
1-Mar-06 |
ER-998-32245-W12 |
1006 |
501 |
2 |
193245.7 |
15-Jul-03 |
AD-456-00845-R45 |
1007 |
0:00 |
3 |
32012.3 |
17-Oct-04 |
AA-341-96573-Z84 |
1008 |
502 |
3 |
44213.6 |
7-Aug-05 |
DR-559-22189-D33 |
1009 |
503 |
2 |
10932.9 |
12-Feb-08 |
DC-007-98456-E94 |
Table name: BASE
Primary Key:BASE_CODE
Foreign Key:none
BASE_CODE |
BASE_CITY |
BASE_STATE |
BASE_AREA_CODE |
BASE_PHONE |
BASE_MANAGER |
501 |
MARTEESTORG |
TN |
615 |
123-4567 |
Andera D. oallager |
502 |
LEXINGTON |
KY |
568 |
234-5678 |
George M. delarosa |
503 |
CAPE GRIADEACA |
MO |
456 |
345-6789 |
Maria J.Talndo |
504 |
DALTON |
GA |
901 |
456-7890 |
Peter F.MaAvee |
Table name: TYPE
Primary Key:TYPE_CODE
Foreign Key:none
TYPE_CODE |
TYPE_DESCRIPTION |
1 |
Single box, double-side |
2 |
Single box, Single-side |
3 |
Tanderht trailer, Single-side |
Use the clatabase shown in above to answer given problems
1: For each table, indentify the primary key and the foreign key(s). If a table does not have a foreign key. write None
2: Do the tables exhibit entity Integrity? Answer yes or no. and then explain your answer.
3: Do the table exhibit referential Integrity? Answer yes a no. and then explain your answer, Write NA (Not Applicable) if the table does not have a foreign key.
4: Identify the TRUCK table's candidate key(s).
5: Foe each table identify a superkey and a secondary key.
6: Create the ERD for this database.