Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions