Question
Consider the following tables (relationship schemes): ROOM ( Name , Number) COURSE ( Id , Name, Subject) ROOMBOOKING ( Course, Room , Date ) (Primary
Consider the following tables (relationship schemes):
ROOM (Name, Number)
COURSE (Id, Name, Subject)
ROOMBOOKING (Course, Room , Date)
(Primary keys are in bold.)
ROOMBOOKING.Course constitutes foreign key towards COURSE.Id
ROOMBOOKING.Room constitutes foreign key towards ROOM.Name
Formulate the following questions in SQL and relational algebra:
a) Which rooms have been booked for Database Methodology? Enter the names of the halls + number of people as each room holds.
b) Which courses have booked all rooms?
c) Which rooms have never been booked?
Formulate the following question in SQL:
d) Which course (s) have booked the most rooms?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started