Vous êtes sur la page 1sur 6

Task#1:

Draw an Entity Relationship Diagram (ER Model) for the given case study along with proper
associations and cardinalities.

Task#2:
Derive the tables from the ER model and normalize up to third normal form (3rd NF)

Task#3:

De-normalize the database (obtained after completing task#2) by using the collapsing tables
technique.
Task#1:
Draw an Entity Relationship Diagram (ER Model) for the given case study along with proper
associations and cardinalities.

Entity Relationship Diagram


Task#2:
Derive the tables from the ER model and normalize up to third normal form (3rd NF)

Tables
Jets
JetID Number Primary Key
JetName Text
JetType Text

Flights
FlightID Number Primary Key
FlightDate Date
FlightJetID Number Foreign Key (Refers JetID in Table Jets)
FlightSource Text
FlighDestination Text
FlightTime Text
RunWayID Number Foreign Key (Refers RunWayID in Table Runways)
ReservedBy Number Foreign key (Refers StaffMemberID in Table Staff)

Passengers
PassengerID Number Primary Key
PassengerName Text
PassengerCell Text

Staff
StaffMemberID Number Primary Key
StaffMemberName Text
StaffMemberDesignation Text
StaffMemberContact Text

Tickets
TicketID Number Primary Key
TicketType Text
PassengerID Number
FlightType Number Foreign Key (Refers FlightID in Table Flights)

Announcements
AnnouncementID Number Primary Key
AnnouncementText Text
AnnouncementStartDate Date
AnnouncementExpDate Date
StaffMemberID Number Foreign Key (Refers StaffMemberID in Table
Staff)
Runway
RunwayID Number Primary Key
RunwayTrack Text
TowerAssigned Number

So an abstract graphical view of the database may look like:


Task#3:

De-normalize the database (obtained after completing task#2) by using the collapsing tables
technique.

De-normalize
Table collapsing: table collapsing de-normalization technique is used on one-to-one and many-to-
many relations. In ER model given in task-1 we do not have man-to-many relations, however, one-
to-one relations were identified between Tickets, Passengers entities and Runway, Flights
and Jets entities.
First we collapse the Passengers and Tickets tables. We suppose that PassengerCell attribute is
unnecessary so finally the resultant Tickets table after collapsing becomes:

Tickets
TicketID Number Primary Key
TicketType Text
PassengerID Number
PassengerName String
FlightID Number Foreign Key (Refers FlightID in Table Flights)

Next we collapse Runway, Flights and Jets tables

First collapsing Runways table with Flights (suppose we need RunwayTrack field only) we
get:

Flights
FlightID Number Primary Key
FlightDate Date
FlightJetID Number Foreign Key (Refers JetID in Table Jets)
FlightSource Text
FlighDestination Text
FlightTime Text
RunWayID Number Foreign Key (Refers RunWayID in Table Runways)
RunwayTrack String
ReservedBy Number Foreign key (Refers StaffMemberID in Table Staff)

Then we merge Jets Table with Flights. The final structure of Flights table becomes:

Flights
FlightID Number Primary Key
FlightDate Date
FlightJetID Number Foreign Key (Refers JetID in Table Jets)
JetName String
JetType String
FlightSource Text
FlighDestination Text
FlightTime Text
RunWayID Number Foreign Key (Refers RunWayID in Table Runways)
RunwayTrack String
ReservedBy Number Foreign key (Refers StaffMemberID in Table Staff)

Finally the abstract view may look like:

Vous aimerez peut-être aussi