Part 5 (20 marks) Figure 4.12. shows an EER diagram for a small airport database
ID: 3803881 • Letter: P
Question
Part 5 (20 marks)
Figure 4.12. shows an EER diagram for a small airport database. Map EER diagram into
a relational schema that consist of relation names, their attributes with primary keys
underscored and foreign keys pointing to the corresponding attributes properly without
using SQL.
Explanation / Answer
Here Entities are(Entity means Nothing but SQL Tables) :
PLANE_TYPE
AIRPLANE
PILOT
EMPLOYEE
OWNER(Two Parts CORPORATION, PERSON)
HANGER
SERVICE
Now,Schemas of corresponding table are :
PLANE_TYPE(ModelNo/PlaneID Primary Key,Model_Name, Capacity, Weight)
PILOT(PlaneID Foreign Key,Lic_No Primary Key,Restr)
EMPLOYEE (EID Primary Key, Salary,Shift)
AIRPLANE(PlaneID/LIC_No/EID as UserID, Password,and other details about Airplane and Registration)
HANGER(HNo Primary Key, Location, Capacity)
OWNER(OwnerID Primary Key,Type, Password)
CORPORATION (CorpID Primary Key,Name, Address,PhNo)
PERSON(PersonID Primary Key,Name,Address,PhNo)
//Notice here OwnerID is foreign key as CorpID/PersonID
SERVICE(Service ID, Hours,Date,WorkCode)