I am doing a hall booking application.
There are many halls at an establishment.
There is a fixed start time and end time for the all the halls, within which the slots should fall.
These are defined in the Hall table with the fields HallID, OpeningTime, ClosingTime.
The table HallBooking contains the booking details. The fields are HallID, Duration, StartTime, EndTime.
The booking is not based on pre-defined slots. The start time and end time could be anywhere between the Hall OpeningTime and ClosingTime. The criteria is that the hall should have a free slot anywhere that day to accomodate the Duration.
So the summary is:
Table Hall (HallID, OpeningTime, ClosingTime) Table HallBooking (HallID, Duration, StartTime, EndTime)
Inputs for booking search: Date, duration
I am using SQL Server 2005. How can I get an availability table/view which shows all the available slots in all the halls? I think if i can get this availability table/view, I can take it up from there.