No, the xref table would have three columns: car_id, trip_id, price.
Quick example:
Code:
cars (car_id, car_name)
(1, 'Mercedes S-Class')
(2, 'Shared Van')
trips (trip_id, trip_name)
(1, 'LAX - MALIBU')
(2, 'LAX - SantaMonica')
(3, 'LAX - SantaMonica')
car_trip_xref (car_id, trip_id, price)
(1, 1, 250)
(1, 2, 150)
(2, 1, 50)
(2, 3, 30)
Sorry , I meant the xref table will have 70+ rows. For example, the car table is correct, but the trips table would have to look like this:
trips (trip_id, trip_name)
(1, 'LAX - MALIBU/private'')
(2, 'LAX - MALIBU/1pax')
(3, 'LAX - MALIBU/2-3pax')
(4, 'LAX - MALIBU/4+pax')
(5, 'LAX - SantaMonica/private')
(6, 'LAX - SantaMonica/1pax')
(7, 'LAX - SantaMonica/2-3pax')
(8, 'LAX - SantaMonica/4+pax')
So if there are say an average of 8 possible trips and ten cars, then we have 80 rows (not columns -- ugh!)
Anyway, even if i do it that way, why is it easier to update this schema? If I add a LAX - San Diego trip, I have to update the trip table (add maybe 4 or more rows) as well as the xref table. If I add a car I have to add a row to the car table and 4 or more rows to the xref table.
If I use my Option (1) above, if i add a trip, i just add up to four columns to the car table. If I add a car I just add one row.
Is adding columns worse than adding rows?
Thanks for your help