rite SQL queries AND Relational algebra expressions (using the relational algebra operators: ρ, σ, π, , υ, ∩, sum, avg, count) for each of the following queries a) List all information about the rooms that have a price below the average price of all single rooms b) For each Hotel, List the total number of rooms c) List the names of hotels that have no booking in them d) List the first name and last name of Parisian guests who book a double room in Paris PLEASE ANSWER THE QUESTION BY WRITING SQL QUERIES AND RELATIONAL ALGEBRA EXPRESSION. Thank you.
Consider the following tables. Primary keys are identified after each table.
Hotel(Hnum,HName,Location) PK = HNum
Room(RNum,HNum,Type,View,Price) PK = RNUM , HNum
Booking(id,HNum,GNum,RNum,DateFrom,DateTo) PK = id
Guest(GNum,Fname,Lname,Gender,DOB,City) PK = GNum
Write SQL queries AND Relational algebra expressions (using the relational algebra operators: ρ, σ, π, , υ, ∩, sum, avg, count) for each of the following queries
a) List all information about the rooms that have a price below the average price of all single rooms
b) For each Hotel, List the total number of rooms
c) List the names of hotels that have no booking in them
d) List the first name and last name of Parisian guests who book a double room in Paris
PLEASE ANSWER THE QUESTION BY WRITING SQL QUERIES AND RELATIONAL ALGEBRA EXPRESSION. Thank you.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps