Week2 Answer
Week2 Answer
Prasanth Kalakota
No of entities:
1. Customer entity
2. Repair entity
3. Service entity
4. Labor entity
5. Parts entity
6. Device entity
7. Uses entity
The ER Diagram for the provided business rules is shown in Crow's Foot notation in the
following figure:
1. The "CUSTOMER" and "REPAIR" entities are related to 1:M. Several devices are available
for repair to customers. Similarly to that, a device may be brought in for repair multiple
times. As a result, the "DEVICE" and "REPAIR" entities have a 1:M connection.
2. There is a 1:M relationship between the Labor entity and the Service entity.
3. There is a 1:M relationship between the Device entity and the Repair entity.
4. A performance that calls for services is REPAIR. Several services might be necessary for
each repair. Similarly to this, various repair devices may require multiple times of each
servicing. But each SERVICE should only have been used once in a certain REPAIR. The
SERVICE may make use of many PARTs. So, There is M: N relationship between the PARTS
17. The primary key and the foreign key(s) of each table in figure P3.17 are given below:
Here, The TRUCK_SERIAL_NUM could also be designated as the primary key. Because the
of a candidate key.
18. Yes. The tables exhibit entity integrity. The explanation is given below:
TABLE PRIMARY ENTITY EXPLANATION
KEY INTEGRITY
are no nulls.
are no nulls.
The table TRUCK exhibits referential integrity. The referential integrity ensures that the foreign
key must always reference an existing primary key or contain a null value. The foreign key of the
TRUCK table points to the existing primary key of the TYPE table. The table BASE and TYPE
KEY(S) INTEGRITY
BASE NONE NA
TYPE NONE NA
Here, the tables BASE and TYPE do not have foreign key values. Therefore, the tables do not
Explanation:
A record can be uniquely identified without referencing any other data by using a column or
collection of columns as the candidate key. Several potential keys may exist in a table. The
candidate key is unique and refers to the primary key. As the TRUCK_NUM is the primary key
of the TRUCK table, the TRUCK_SERIAL_NUM can be a primary key. So, it can be a
candidate key. Therefore, the candidate key of the TRUCK table is TRUCK_SERIAL_NUM.
21. Superkey and a secondary key of each table in Figure P3.17 are given below:
TRUCK_BUY_DATE. Therefore,
name.)
There is a 1:M relationship between the BASE table and the TRUCK table. Also, the 1:M
References
Rayan, J. C. (2015, February 20). Data Modelling using ERD with Crow Foot Notation.
Modelling-using-ERD-with-Crow-Foot-Notation
www.gleek.io/blog/crows-foot-notation.html.
“Ex3 Answers - Exercise 3 Use the Database Shown in Figure 1 to Answer Problems 1-7.
university/database-management/ex3-answers/9558105.