Is it possible to display this restriction in an ER diagram? I have a question about modeling a particular kind of restriction, but I don't know the technical term for it, so I will illustrate it with an example.

I wish to make an ER diagram for a hotel room booking. Is it possible in an ER diagram to show that no two bookings of the same room, in the same hotel, in an overlapping time interval can occur? In my initial diagram, I have three entity types: Hotel, Room and Booking. But I don't know if I should use a ternary relationship or just three binary ones, or even if I should have three entity types. Any help would be greatly appreciated.

Edit: One booking can have many rooms in the same hotel. Also, I need to be able to book the same room, in the same hotel on distinct bookings, as long as the start date and end dates of booking X doesn't overlap with the start date and end date of booking Y



My problem is that (if I understand correctly) there is no way to tell from this diagram that two distinct bookings can't book the same room, in the same hotel in an overlapping time interval. Can I somehow modify this picture to show that constraint?
The short answer is "no."

Entity relationship diagrams can be used to show constraints based on the relationships between entities.  However, the particular constraint you want to show (that bookings do not overlap in time) is a constraint between rows in the same table, not between two or more tables.

The only single table constraint that can be illustrated in most common entity relationship diagrams is uniqueness, since ER diagrams can illustrate a primary key.