Question: Based on these tables, write the query/queries that shows all double bookings. This means no guest can book two rooms in an overlapping time frame

 Based on these tables, write the query/queries that shows all double

Based on these tables, write the query/queries that shows all double bookings. This means no guest can book two rooms in an overlapping time frame and no one room can have two separate Bookings with over lapping time frames.

describe Room; + --------- +------- --+---+- ----+------ ---+------- + | Field | Type Null | Key | Default Extra + --------- +------- --+---+- ----+------ ---+------- + | roomNo Tint(3) | hotelNo int(4) | type varchar(9) | price decimal(5,2) YES | YES YES YES | NULL NULL, NULL NULL T | | + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + describe Guest; + -------------- -------------+------+-----+--------+--+ | Field | Type | Null | Key | Default | Extra + ------------ ----------+----+---------+-------+ | | guestNo I int(7) YES | guestName Tvarchar(30) | YES I guestAddress | varchar(50) | YES NULL NULL NULL + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - + - - - - - - - + describe Booking; +----------+--------+------+-----+---------+.......+ | Field Type Null | Key | Default | Extra + - - - - - - - - - - + - - - - - - - + - - - - - + - - - - + - - - - - - - - + - - - - - - - + I | hotelNo int(4) | YES I guestNo Tint(7) | YES dateFrom date YES | dateTo date YES | roomNo int(3) | YES NULL NULL NULL NULL | NULL + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - + - - - - - - - +

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!