Passenger flight log

D

David Lawrence

I am trying to create a database which will log the
flights I do as a passenger. I have got a table with
airports and another table with aircraft types. I have
created another table (the Flight Log itself) which needs
to be related to both of the others. From the Flight Log
table I want to be able to select an aircraft from the
Aircraft table, a Departure airport and an Arrival airport
from the Airports table (as well as inputting flight
duration, date etc.) So when I select a Departure airport
and an Arrival airport, I need to retrieve data for both
of these from the Airports table. What I cannot understand
is how do I set up the relationships between these tables?
I'm sorry if this is very basic but any help would be
greatly appreciated.
 
C

Chris Nebinger

Here's how I figure it:

Aircraft:
AircraftID
AircraftType

Airports:
AirportID
Airport
City
State

Flights:
FlightID
AircraftID
DepartureID 'Links to AirportID
ArrivalID 'Also links to AirportID
DepartureDate
ArrivalDate


Now, the key to doing this in the relationships window is
not to draw two lines from the Airport table to the
Flights table, but rather, add the Airport table to the
window twice. The second instance will show up as
Airports_1. Now, you have two tables and two relatioships.


Chris Nebinger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top