Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Database structure for a booking system storing nights boo..

 
   Database Forums (Home) -> General Discussion RSS
Next:  subtotal on form footer  
Author Message
bissatch

External


Since: Dec 10, 2004
Posts: 11



(Msg. 1) Posted: Fri Jan 25, 2008 12:21 pm
Post subject: Database structure for a booking system storing nights booked for
Archived from groups: comp>databases (more info?)

Hi,

I am reseaching into the best method for implementing a booking system
data structure. My booking system in full will be used to store
details on landlords apartments .. this part isnt too big an issue for
me as I can have a table called 'landlord' and a table called
'property' which will both tie up with one another (one property will
have one landlord, one landlord may have many properties). The part Im
unsure about is where customers will choose an apartment to stay for a
few nights and what the best way to go about this is. My idea is:

booking - this table will contain a single booking entity such as
customer name, contact details, date_booked, additional_notes (ie.
pick up keys at 2pm) .. but will not contain dates, nights. It will
contain a foriegn key column which will tie it up with the property (1
property may have many booking entries, each booking will only even
have of one property)

booking_night - this table will contain nights booked and each row
will be one night. It will contain a foriegn key column called
booking_id which will tie up with the booking table primary key. One
booking entry may contain 1...* booking_table rows dependant on the
number of nights booked for that customer (4 rows = 4 nights).

Now I think this is the best way to go about it but would really
appreciate some advice if possible. One of the main challenges will be
implementing the availability calendar (well, only coz Ive never done
one before) so this is why i want individual entries for the nights so
the days of the month would check if they have a entry in
booking_night for that property. I am hopefully that this will host
many many apartments so if I can adopt the most efficient method of
storing data for performance then Im off to a good start. Cheers

Burnsy

 >> Stay informed about: Database structure for a booking system storing nights boo.. 
Back to top
Login to vote
David Harper

External


Since: Nov 02, 2007
Posts: 3



(Msg. 2) Posted: Mon Jan 28, 2008 5:46 pm
Post subject: Re: Database structure for a booking system storing nights booked for individual properties [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wrote in message

> Hi,
>
> I am reseaching into the best method for implementing a booking system
> data structure. My booking system in full will be used to store
> details on landlords apartments ..

<snip>

See:



http://www.databaseanswers.com/data_models/apartment_rentals/index.htm



....to get some ideas. See Google for others...



- David Harper

 >> Stay informed about: Database structure for a booking system storing nights boo.. 
Back to top
Login to vote
Display posts from previous:   
   Database Forums (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]