Page 1 of 1

a DB nut to be solved .. Airline booking system lookalike

Posted: Wed Jun 29, 2011 6:56 am
by NewGuy
Hi .. ok ... so i cant figure this out ... and would love some help and pointers to be steared in the right direction

Im still learning, and right now im trying to figure out the whole DB and relations thing

Scenario:

I have 3 tables in this "Airline booking system look-a-like"

Table 1 - People: a table of people with a primary key

PK - PeopleID
  • - Name
    - Adress
    etc.
Table 2 - Flight : a table of the actual Flight with a primary key

PK - FlightID
  • - Airplane type
    - Airplane name
    etc.
Table 3 - PeopleFlight: a table that combines table 1+2

PK - People_Flight_ID
  • FK - PeopleID
    Fk - FlightID

So fare soo good .. BUT ... 2 questions

When i register airplane trip .. i want to get the whole list of ALL people in the system from the table "people" .. ex. 5 people (this i can do.. just whip up a list of all people in the table people) :
  • - John
    - Lisa
    - Jody
    - Mona
    - Kim
but only 2 people are joining this airplane trip (this i don't know how to make happen)
  • - kim
    - john
Questions :

1. Can someone help me figure out how the "form" is surpose to look like in vb.net for this scenario ? .. i cant figure it out since it involves more than one table, and therefore also needs to update both tables i guess ? .. or am i getting it wrong

2. and further more on the same "form" ... the airplane has ex. 5 seats .. i want to know in which particular seat that ex. Kim was placed on that particular flight .. ex. seat 3 ... do i need a special table for that too ? ..

Thank you so much on beforehand for the help in this matter ! i realy enjoy "codenstuff" .. and i hope i at some point will be able to help people out myself.. and do some "payback" :)