Designing a database for a reservation request, for example. Hotel

I built one, but I am convinced that this is wrong.

I had a table for customer information, and another table with each date (i.e. a weekly vacation would have seven entries).

Is there a better way?

I am code in PHP with MySQL

+3
source share
12 answers

PMS. , , , , . . , . .

, MySQL, startdate/enddate . "where date in (date)".

:

Bookings (id, main-guest-id, arrivaltime, departime,...)

BookingGuests (id, guest-id)

BookingGuestNights (date, room, rate)
+3

, :

  • , ?
  • ?
  • , , ?
+1

, . , , , .

  • 1 (, -, , ).
  • / . , /, . , 10 2 .
+1

, .

= html.

CodeIgniter Calendar . ( , ), . , , .

.

,

+1

? , , , , .

0

... , . , .

0

, . "".

stay.check_in_time_scheduled
stay.check_in_time_actual
stay.check_out_time_scheduled
stay.check_out_time_actual
0

, ? , , / , . , , , ( ) ..

, , , .

0

- , . . , , .

, , , .

. "", " ", .

.

0

(, , )

, , X n .., .

/ /num ... :)

, SQL-:)

0

. .

:

"" .

.

  • ixVisit
  • ixCusomer
  • sNote

:

  • ixCustomer
  • sFirstName
  • sLastName

:

Stay , . , udpated.

  • ixStay
  • dtArrive
  • dtLeave
  • sNote

- - : SELECT CRUD. - 99% SELECT 1% CRUD. CRUD , SELECT. , . CRUD, SELECT , SELECTS Stay.

, : ", , , "

-, , , , .

0

Source: https://habr.com/ru/post/1696905/


All Articles