If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Best Design for a booking system

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-06, 13:08
mwease mwease is offline
Registered User
 
Join Date: Apr 2006
Posts: 2
Best Design for a booking system

I am trying to create a booking database...but the design I keep coming up with makes me a bit uneasy. I don't really like it (because of massive joins involved in determining what time slots are available) but I don't see any other way to do this. So this is my design.

--This table stores incidences of booked time slots
TABLE:Booking_Incidence
BookingID
BookingStartDate (DateTime)
BookingEndDate (DateTime)
FK_UserID

--This Table stores the generally available booking times for each week. Eg. If users can book from 9:00am to 5:00pm monday to friday then there would be an entry with
slotstarttime = 9:00, slotendtime=17:00,sun=false,mon=true,tue=true, wed=true, thur=true, fri=true, sat=false

TABLE:General_Avail_Booking
SlotStartTime (Time)
SlotEndTime (Time)
Sun (boolean)
Mon (boolean)
Tue (boolean)
Wed (boolean)
Thur (boolean)
Fri (boolean)
Sat (boolean)

--This table stores any possible exceptions that might occur outside of the general booking times (eg a holiday). bAvailable determines if the exception allows for a new booking, or cancels an existing one.

Table: Booking_Exceptions
SlotStartDate (DateTime)
SlotEndDate (DateTime)
bAvailable (boolean)


I use General_Avail_Booking and Booking_Exceptions to determine the possible times when users can actually book a time slot, and then store what time slots users book in Booking_Incidence. I'm sure there is a better way to create a booking system and I would really appreciate some help or some standard designs that others have made.
Reply With Quote
  #2 (permalink)  
Old 04-12-06, 19:59
B Jarvis B Jarvis is offline
Registered User
 
Join Date: Sep 2005
Posts: 22
In a paper system a day is divided up into time units eg 1 hour. When a booking for a room is made the appropriate number of time units are reserved. There is no need for exceptions or start and end times. It is just like memory allocation if you like.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On