Exercise 2

In this exercise, you will design the ER model for flight database.

We'll cover the following

The flight database

The flight 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.

Consider the following requirements list:

Entities:

  • AIRPLANE entity

  • FLIGHT entity

  • PASSENGER entity

  • BOOKING entity

Attributes:

  • An airplane has a model number, a unique registration number, and the capacity to take one or more passengers.

  • An airplane flight has a unique flight number, a departure airport, a destination airport, departure date and time, and arrival date and time.

  • A passenger has a first name, surname, and unique email address.

Relationships:

  • Each flight is carried out by a single airplane.

  • The airline has one or more airplanes.

  • A passenger can book a seat on a flight.

Try to design the ER diagram on your own. Give it some time and if you have trouble remembering some of the concepts, feel free to take a look at the previous lessons.


In the next lesson, we will discuss the solution to this problem.

Get hands-on with 1200+ tech skills courses.