Draw an ERD from the following description: The Air-Travel Database The Air-Travel database stores details about an airl
Posted: Fri May 20, 2022 3:32 pm
Draw an ERD from the following description:
The Air-Travel Database
The Air-Travel database stores details about an
airline’s fleet, flights, and seat bookings. Again, it’s a hugely
simplified version of what a real airline would use, but the
principles are the same.
There are 4 entities you need to create –
Airplane, Flight,
Booking, and Passenger.
Consider the following requirements list:
An Airplane is uniquely identified by its RegistrationNumber, so
we use this as the primary key.
A Flight is uniquely identified by its FlightNumber, so we use
the flight number as the primary key. The departure and destination
airports are captured in the From and To attributes, and we have
separate attributes for the departure and arrival date and
time.
Because no two passengers will share an email address, we can
use the EmailAddress as the primary key for the Passenger
entity.
An airplane can be involved in any number of flights (including
zero), while each flight uses exactly one airplane.
Because a flight cannot exist without an airplane, the Flight
entity participates totally in this relationship.
A passenger can book any number of flights (including zero),
while a flight can be booked by any number of passengers (including
zero). We could have specified an M:N Books relationship between
the Passenger and Flight relationship, but as was discussed in the
class, we want to convert this into two separate 1:M relationships
by introducing an associative entity type, Booking. The Booking
entity has 1:M relationships between it and the Passenger and
Flight entities.
The Air-Travel Database
The Air-Travel database stores details about an
airline’s fleet, flights, and seat bookings. Again, it’s a hugely
simplified version of what a real airline would use, but the
principles are the same.
There are 4 entities you need to create –
Airplane, Flight,
Booking, and Passenger.
Consider the following requirements list:
An Airplane is uniquely identified by its RegistrationNumber, so
we use this as the primary key.
A Flight is uniquely identified by its FlightNumber, so we use
the flight number as the primary key. The departure and destination
airports are captured in the From and To attributes, and we have
separate attributes for the departure and arrival date and
time.
Because no two passengers will share an email address, we can
use the EmailAddress as the primary key for the Passenger
entity.
An airplane can be involved in any number of flights (including
zero), while each flight uses exactly one airplane.
Because a flight cannot exist without an airplane, the Flight
entity participates totally in this relationship.
A passenger can book any number of flights (including zero),
while a flight can be booked by any number of passengers (including
zero). We could have specified an M:N Books relationship between
the Passenger and Flight relationship, but as was discussed in the
class, we want to convert this into two separate 1:M relationships
by introducing an associative entity type, Booking. The Booking
entity has 1:M relationships between it and the Passenger and
Flight entities.