I am creating a database for a travel agent.
In a nutshell it looks like this
tblBookings
BookingID PK
BookingName etc
tblGuests
GuestID PK
BookingID FK
tblProducts
ProductID PK
ProductName etc
tblGuestProducts
ProductID PK
GuestID PK
ProductType etc
This is the joining table
Some of the ProductTypes are
1. Accommodation
2. Transport
3. Various activities
In an attempt to Normalize the data I am putting disparate data in other tables. For example Accommodation requires a check in and check out field whereas Transport only requires a date. Some activities don’t even require a date.
So my approach is to have more tables, say
tblAccomodation
AccomodationID PK
ProductID FK
tblTransfer
TransportID PK
ProductID FK
1. Does this structure seem sound?
2. Given that a booking will often stay in more than one accommodation there would be a many to many relationship with tblBooking and tblAccommodation – but would I need a joining table given this structure?
In a nutshell it looks like this
tblBookings
BookingID PK
BookingName etc
tblGuests
GuestID PK
BookingID FK
tblProducts
ProductID PK
ProductName etc
tblGuestProducts
ProductID PK
GuestID PK
ProductType etc
This is the joining table
Some of the ProductTypes are
1. Accommodation
2. Transport
3. Various activities
In an attempt to Normalize the data I am putting disparate data in other tables. For example Accommodation requires a check in and check out field whereas Transport only requires a date. Some activities don’t even require a date.
So my approach is to have more tables, say
tblAccomodation
AccomodationID PK
ProductID FK
tblTransfer
TransportID PK
ProductID FK
1. Does this structure seem sound?
2. Given that a booking will often stay in more than one accommodation there would be a many to many relationship with tblBooking and tblAccommodation – but would I need a joining table given this structure?