## Solutions - ERD/EERD Practical  0

---

### Summary notes for solutions.
* Summary:
	* Vehicles are specialized into Car, Truck, Motorcycle; each subtype has extra attributes. 
	* Persons ae specialized into Customer and Mechanic.
	* Weak entity: WorkOrderLine (identified by line_no within its WorkOrder).
	* Multivalued attribute: Customer has multiple phone numbers.
	* Composite attribute: Customer address (Street, City, Postcode).
	* Derived attributes: Vehicle age from Year; WorkOrder totalAmount from its lines.
	* Partial, total participation and cardinalities are based on description.

* The solutions were drawn using paint on Linux.

### Exercise 1. Construct an ERD matching  the autorepair  shop  description.

<img width="70%" src="images/practical_0_ERD.png" />

---
### Exercise 2. Construct an  EERD with  specialisations based on the  ERD in exercise 1.

<img width="70%" src="images/practical_0_EERD.png" />

---

 Remember that there are multiple ways to solve these problems, if you are unsure, post your solution in the workshop forums for discussion. 
