economyman
Registered User.
- Local time
- Today, 03:06
- Joined
- Jul 7, 2008
- Messages
- 18
Hi
I'm building a DB to manage a seasonal booking system for a tour operator that runs some special events during the year at several hotels. The operator receives allocations of rooms for a given period (from date to date) including sometimes several different room types per hotel per event.
I want the system I am designing to be able to check each time a new booking is entered whether there is room still available. It's rather complex in that sometimes a booking may begin before or extend after the specific event dates and thus be outside the allocation period. But I'll find a way (I hope) to deal with that. Another point is that sometimes, a room is used for two different booking during the same event if say for example some people come for the first half and the other for the second half.
Now, here's my questions: should I build some kind of matrix for each room allocated for each night allocated and have an occupied yes/no field for each point in the matrix so that it is easy to look up or would this go against the rule of recording calculated fields? After all I have a table with the allocation details of room type and from / to date and I have the booking. It's possible (although I don't yet know how) to build a function to calculate availability using these two pieces of information rather than doing it with a quick look up in the matrix.
I'm pretty sure, if I was working in good old DOS basic that's how I would have done it (with a DIM).
Of course I would prefer to have something as general as possible and don't want to have to build new tables manually each time a new event / allocation is added.
I would really appreciate any input available.
I'm building a DB to manage a seasonal booking system for a tour operator that runs some special events during the year at several hotels. The operator receives allocations of rooms for a given period (from date to date) including sometimes several different room types per hotel per event.
I want the system I am designing to be able to check each time a new booking is entered whether there is room still available. It's rather complex in that sometimes a booking may begin before or extend after the specific event dates and thus be outside the allocation period. But I'll find a way (I hope) to deal with that. Another point is that sometimes, a room is used for two different booking during the same event if say for example some people come for the first half and the other for the second half.
Now, here's my questions: should I build some kind of matrix for each room allocated for each night allocated and have an occupied yes/no field for each point in the matrix so that it is easy to look up or would this go against the rule of recording calculated fields? After all I have a table with the allocation details of room type and from / to date and I have the booking. It's possible (although I don't yet know how) to build a function to calculate availability using these two pieces of information rather than doing it with a quick look up in the matrix.
I'm pretty sure, if I was working in good old DOS basic that's how I would have done it (with a DIM).
Of course I would prefer to have something as general as possible and don't want to have to build new tables manually each time a new event / allocation is added.
I would really appreciate any input available.