Hello,
I have a table where I want to insert values for each day and each ID:
Table: Availabilities
HotelID (bigint)
Day (datetime)
Availability (smallint)
to ensure that a hotel can only have one Availability Value for each day (e.g. 2008-06-10 00:00:00) I see two solutions:
HotelID and Day as combined primary key or HotelID and Day as unique constrained. Note that a SP will ensure that only datetimes with time 00:00:00 can be inserted.
How would you solve this?
greetings