StuckInLiverpool
New member
- Local time
- Yesterday, 20:44
- Joined
- Nov 6, 2011
- Messages
- 7
Hope someone can help.
I need to create (for college) a small database for a hotel. It must prevent double bookings.
I have the following tables:
Customer
BookingStaff
Rooms
Bookings (with composite key: BookingDate and RoomID. It also has CustomerID as a foreign key.)
This works well and prevents double bookings.
However, I want to add on Room Service. I have an Item table with ID, Item and Price. I have a Quantity table with ID, Quantity, ItemID and I need to add an ID from the Booking table. I really need the date here. However, if I add the BookingDate as a Date field and try to link it to BookingDate from the Booking table, I get an error message.
I can't have a straightforward number ID on the Booking table as I need Date and RoomID as a composite key. If I include a BookingID (number field) in there, I can't have a composite key.
Does anyone know how I can have Room Service and Bookings in the same database?
Thanks.
I need to create (for college) a small database for a hotel. It must prevent double bookings.
I have the following tables:
Customer
BookingStaff
Rooms
Bookings (with composite key: BookingDate and RoomID. It also has CustomerID as a foreign key.)
This works well and prevents double bookings.
However, I want to add on Room Service. I have an Item table with ID, Item and Price. I have a Quantity table with ID, Quantity, ItemID and I need to add an ID from the Booking table. I really need the date here. However, if I add the BookingDate as a Date field and try to link it to BookingDate from the Booking table, I get an error message.
I can't have a straightforward number ID on the Booking table as I need Date and RoomID as a composite key. If I include a BookingID (number field) in there, I can't have a composite key.
Does anyone know how I can have Room Service and Bookings in the same database?
Thanks.