Could any please answer the following question. Pleasehelp. 1.) Consider the fol
ID: 3613858 • 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 * 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 * FROM HotelBookingCount; Please help.Explanation / Answer
a) SELECT * FROM HotelBookingCount; is a valid query... VIEW is a virtual table...we can use querieslike above on VIEWs This query gives all the HotelNo's and number of bookedrooms in that particular hotel grouped byHotelNo
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.