Hi I am a student from Venezuela and I have to make a DB in Access to control a few things of a fictional airport.
I have to keep information on Passangers, Pilots, Stewards, Airlines and of course Flights (Flight N°, Date&Time of departure, boarding gate, destination, etc). All of the above I have put in tables with keys ID_Card for Passangers, Pilots and Stewards, Name for Airlines and Flight N° and Date&Time for Flights. Also I have made tables that associate th different categories as follows:
Table Flies: Associates Pilots with Flights Table Serves:Assosiates Stewars with Flights Table Travels: Associates Passangers with Flights, this association also has a passanger seat and a ticket cost. Table Does: assosiates Airlines with Flights
The keys for the associations are the keys of the categories that make up the association.
I have implemented all this in Access, but I've got a problem, I can't prevent having 2 passangers in the same seat on the same flight.
Probably it is a problem with my modelling or is there a way around this?
I really hope someone can help. ANY help would be appreciated!
Thanks a lot!
PD: Don't worry if the categories sound funny in English, in Spanish they sound allright.
You should use an index in your Table Travels and then set it as your primary key with No Duplicates. Open your Table Travels in design view. Select the Index Icon on the Tool Bar. In the first column Type SeatFlight. In the next column over select the Flight Number field. Right below that select the Seat Number Field. Right below that select the Flight Date field. There should not be anything in the first column except in the top row. Then set the index as Primary Key with Unique Value and No Duplicates.