0

I have simple database. It contains 2 tables.

  1. Rooms
  2. Reservations

They is relations via room ID. How can I prevent in Reservation table to do not make a reservation for one room in the same date?

Hubert S
  • 77
  • 7

1 Answers1

0

you can insert an unique constraint on fields (roomID and reservationDate). In this way you'll can have only a reservation for a room in a date. If you want to unlock a room, you'll have to delete a reservation row.