"how to normalize a database schema" Code Answer

4

the schema you proposed would mean that each customer could be related to one (not zero, not more than one) flight, which feels wrong.

in essence, i think you have a many-to-many relationship, which you can do with three tables:

customer (id(pk), lastname, firstname)

flight (id(pk), flightarrival, flightdepart)

customer_flight (
    customer_id references customer(id),
    flight_id references flight(id)
)
By AnnieFromTaiwan on April 1 2022

Answers related to “how to normalize a database schema”

Only authorized users can answer the Search term. Please sign in first, or register a free account.