I have simple database. It contains 2 tables.
- Rooms
- 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?
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.