简体   繁体   中英

Normalize to Boyce Codd Normal Form in relational data model

OK this is probably very basic for the majority of you, but I'm struggling to do this assignment (Yep, it's homework). I've attempted this twice now and failed both times so far.

I need to create a relational data model in Boyce Codd Normal Form. Here are the details:

The Airport Authority in a small nation requires a database to store information about airlines, pilots and planes.

There is only one airport but several airlines use it. For each airline its identification code and full name is required together with the phone number of its local office. Several types of plane use the airport and for each type, the fuel capacity and maximum range is to be recorded.

Each pilot works for only one airline. For each pilot, their name, date of birth, address, the types of plane they can fly and their pilot‟s licence number is to be recorded. Further information is to be recorded to enable the production of a report listing the following details for each plane that uses the airport: Plane identification code, Plane type, Date of manufacture, Owning airline.

This is what I now have (After re-designing):

The table AIRLINES should include:

ID,
Name,
Phone #

The table PLANES should include:

ID,
Date of Manufacture
Airline ID
FOREIGN KEY (Airline ID) references table AIRLINES
Plane Type ID 
FOREIGN KEY (Plane Type ID) references table PLANE TYPE

The table PLANE TYPE should include:

ID,
Maximum range,
Fuel capacity,

The table PILOTS should include:

ID,
Name,
Date of Birth,
Address,
License #,
Airline ID,
FOREIGN KEY (Airline ID) references table AIRLINES
PilotPlaneID
FOREIGN KEY (PilotPlaneID) references table PILOTPLANETYPE

The table PILOTPLANETYPE should include:

   PilotID
   PlaneTypeID
   FOREIGN KEY (PilotID) references table PILOT
   FOREIGN KEY (PlaneTypeID) references table PLANE TYPE

According to my marker, I had have left a many to many relationship between Pilot and Plane Type. Can someone with some database design knowledge please give me helping hand?

(EDIT: Tables now updated with PILOTPLANETYPE, which I think should satisfy the requirements)?

Your design has one plane type per pilot.

The description contains "the types of plane they can fly". This plural suggests that each pilot could be flying many planes.

Since this is homework, I'll let you figure out how to put this information into your design.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM