what is the best way to design a room hotel resveration system
is it by crating entites : reservation( room_id, start_date, end date)
or by creating entites : calender( calender_id, date), reservation(reservation_id, room_id, client_id) bookedates(reservation_id, calender_id) where to store dates of reservation

ps : it will be an onlnie reservation system so we have to show client available dates for reservation

thx

Hi,

I think the best setup is:
calender( calender_id, date)
reservation(reservation_id, room_id, client_id,calender_id)
This way you will have the max control over your database where for wach day the client reservers a record will be inserted and if x days where reserved x records will be inserted. I have applied this to a hospital reservation system and it is working excelent as I can transfer reservation, break it, or cancel it easily.

You have these entities
hotel(hotel_id,hotel_name,other details)
hotel_rooms(hotel_id,room_id,other details)
bookings(booking_id,date_from,date_to)
Guests(guest_id, name, etc.)
Room_bookings(booking_id,date_booking_from,date_booking_to,room_count)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.