Airport Database Design guidance required

application-designdatabase-designnormalizationrelational-theoryschema

I am trying to make a generic database for airport management and DBMS would be oracle 11g xe. Since, i am amateur and still learning so i have tried to kept the problem statement simple with limited entities involved:

Airport serves a city but every city may not have an airport. An airline has office(ticketing booth) at airports they cover and hence an airport may have many airline offices. Airport accommodates airplanes and airplanes may or may not belong to a certain airline(considering private jets). Airports may have one runway or more than one. Runway has a name and length. Every airport has a manager. Manager can cross view the other data but he can alter data for airport under his belt only- this i think will be applied via front-end application using 'APEX'.

Here is the relational schema i have worked so far:

City (CityID{PK}, CityName, CountryName)

Airport (AirportID{PK},AirportName, ICAO, IATA,ManagerID{FK},CityID{FK})

AirportRunway (AirportID{FK}, RunwayID{FK}, RunwayName, length)

Airline (AirlineID{PK}, AirlineName, IATA, ICAO)

AirportAirlineOffice (AirlineID{FK}, AirportID{FK}) both foreign keys make a primary key.

Airplane (AirplaneID, Model, Make, AirlineID{FK})

Manager (ManagerID{PK}, username, password, ManagerName)

I am confused over manager relation considering what i am trying to implement. Do i need to make relationsship of manager with other entities as well? Do i need to make AirlineOffice as entity or it is good as it is. And what changes do i need to do so that i can convert this schema to 3rd normalized form!

edit: here is my ERD:

ERD

Best Answer

You mention every airport has a manager so the manager table should have AirportID as an FK. The Office table should have AirportId and AirlineID as FKs

Related Question