ERD - Question & Answer - Example
ERD - Question & Answer - Example
Harris’s Pet Store has requested you to design a database to store information on sales
on animals and merchandises. The sales form is shown in Figure C1 below. Answer
questions 1 and 2.
a) Identify all entities and attributes for each entity from the Sales Form in
Figure C1. Provide your answer in the following format.
a)
Entity Attribute
Customer CustID, CustName, Address, City, State, ZIPCode
Employee EmpID, EmpName
Animal AniID, AniName, AniCategory, Breed, DOB, Gender,
Registration, Color, AniLPrice
Merchandise Item, Description, MerCategory, MerLPrice,
Sale SaleNo, SaleDate, AniSubTotal, MerSubTotal, SaleTax,
SaleTotal
b)
Animal
+AniID(PK)
+AniName
+AniCategory
+Breed
+DOB
+Gender
+Registration
+Color
+AniLPrice
0..*
SOLD -------------------------
+SalePrice
0..*
Customer Sale
+CustID(PK) +SaleNo(PK) HANDLE Employee
MAKE
+SaleDate +EmpID(PK)
+CustName
+AniSubTotal
+Address 1..1 1..* 1..* 1..1 +EmpName
+MerSubTotal
+City +SaleTax
+State +SaleTotal
+ZIPCode
0..*
+QtySold
+MerSaPrice
SELL --------------------- +MerToItSaPrice
0..*
Merchandise
+Item(PK)
+Description
+MerCategory
+MerLPrice