Almost Finished Data Structure, But Found A Small Problem, Please Help Me!

sirantonycartwr

Registered User.
Local time
Today, 12:37
Joined
Dec 10, 2006
Messages
45
Hello, This forum is a great idea by the way, its so helpful having a an array of experts who are willing to help! Its really cool, thanks for the forum.

Anyway, here is my ER-D:
relationships.JPG

OK, My problem is specifically in this area of the ER-D:
Problem.JPG

Getting down to the actual problem:
Notice that currently a booking has a stakeholder, a room, a date, a time and hours booked. (stakeholder ID, Room, and hours booked being FK's)
Youll notice that Room, Date and Time are all a composite key for a record.

Now in your mind break the relationship between rooms and hours tables from bookings. Remove room and hours booked from the bookings table and add a field called Room tariff ID. Make a field with the same name in the room_tariff table. Make it indexed with no duplicates. Now link the two feilds from the booking and room _tariff tables together, bookings having the many side.

The benefit of doing it this way is that in a form i can choose a tariff by looking through the room tariff table showing its price, etc which will look better without entering data into two fields.

Is this a better way of doing it or should i leave it as it is?
Thanks, Ant...
 

Users who are viewing this thread

Back
Top Bottom