B
B
bahek24627742014-10-24 22:23:54
SQL
bahek2462774, 2014-10-24 22:23:54

Database organization - Booking ?

help at least roughly design a database - something like Booking.
As many tour operators do: All prices are recalculated for each situation:
for example, such tariffs are added to each price
1) per person
2) per room (maximum two people)
3) two adults + child
4) two adults + 1 adult for additional / attachment
, etc. - but this approach is labor-intensive - in terms of - that each price list provided by the hotel / sanatorium / boarding house - has to be recalculated. I understand - that in most systems - the objects do the whole routine themselves, but we need to consider it ourselves - for the majority.
Plus - the conditions may differ - such as the type of food (3 meals a day / all inclusive / breakfast only), the type of treatment may differ - with or without treatment, or SPA.
As an option, you can consider three basic tariffs
1) single accommodation
2) per room (indicate the maximum number of people)
3) 1 adult + child (age of the child)
and make a separate price list for additional beds.
But here the question remains - everyone has additional places - they depend on different conditions, and they can intersect all together
1) from the dates of arrival
2) from the type of room
3) from the type of room and dates of arrival
, etc.
Maybe someone has experience - in the design of such bases. Or any smart ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Koltcov, 2014-10-25
@Vityarik

It is possible to consider each characteristic as a separate entity/table.
For example, entities check-in date, room type.
For each hotel, you can make a set of combinations of such characteristics. And write a price for each set.

D
dph, 2015-01-13
@dph

Start not with data, but with scenarios for working with them:
what to look for, what to return, which queries should work quickly, which ones - at least somehow, then it will become easier to come up with a database structure.
I suspect that there is a "number type" entity, with a bunch of parameters like capacity, expandability, etc.
There are possible services (linked either to the type of room or to the hotel in general)
There are prices for rooms and services (linked to dates, payment parameters, etc.)
The request "room with a shower for two people" is translated into the "room type" property set and "additional services" (i.e. union for several requests) and only then, based on the search results, we look at the price.
However, with booking volumes, the search anyway, I suspect, takes place on the applayer in memory,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question