crew_assignments table
The crew_assignments table in the Airline Reservation Database Schema schema has 4 columns, with 2 foreign keys to flights and crew_members.
The role is repeated here rather than read from crew_members, because a first officer can be rostered as captain on a given flight.
Columns (4)
| Column | Type | Constraints | Description |
|---|---|---|---|
| flight_id | uuid | not null, references flights.id | |
| crew_member_id | uuid | not null, references crew_members.id | |
| role | crew_role | not null | |
| assigned_at | timestamptz | not null |
Indexes (1)
(crew_member_id, assigned_at)
Relationships
crew_assignments.flight_idreferencesflights.idcrew_assignments.crew_member_idreferencescrew_members.id