Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    1

    Unanswered: I'm new and in need!

    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!

    Gabriel

    PD: Don't worry if the categories sound funny in English, in Spanish they sound allright.

  2. #2
    Join Date
    Dec 2004
    Posts
    3
    Have you tried making the field as unique (no duplicates)?

  3. #3
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    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.

    TD

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by gabzuka
    .....but I've got a problem, I can't prevent having 2 passangers in the same seat on the same flight.
    Sounds like a real airline reservation system then....

  5. #5
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    Quote Originally Posted by healdem
    Sounds like a real airline reservation system then....
    You are right healdem! We need to find out who designed their systems and point them to dBforums for some help with a unique index.

    TD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •