Could any please answer the following question. Pleasehelp. 1.) Consider the fol
ID: 3613859 • Letter: C
Question
Could any please answer the following question. Pleasehelp. 1.) Consider the following view defined on the HotelSchema: CREATE VIEW HotelBookingCount (hotelNo, bookingCount) AS SELECT h.hotelNo, Count(*) FROM Hotel h, Room r, Booking b WHERE h.hotelNo = r.hotelNo AND r.roomNo = b.roomNo GROUP BY h.hotelNo; For each of the following querie, state whether the query isvalid and for the valid ones show how each of the queries would bemapped on to a query on the underling base tables. (a) SELECT COUNT(*) FROM HotelBookingCount; Please help. Could any please answer the following question. Pleasehelp. 1.) Consider the following view defined on the HotelSchema: CREATE VIEW HotelBookingCount (hotelNo, bookingCount) AS SELECT h.hotelNo, Count(*) FROM Hotel h, Room r, Booking b WHERE h.hotelNo = r.hotelNo AND r.roomNo = b.roomNo GROUP BY h.hotelNo; For each of the following querie, state whether the query isvalid and for the valid ones show how each of the queries would bemapped on to a query on the underling base tables. (a) SELECT COUNT(*) FROM HotelBookingCount; Please help.Explanation / Answer
a) SELECT COUNT(*) FROM HotelBookingCount; is also a valid query. This query gives the number of rows in the viewHotelBookingCount.which intrun has HotelNo and the number of roomsbooked grouped by HotelNo's