Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The relations given below are part of a database schema for a hotel management system. Assume that these relations have been populated with suitable data

The relations given below are part of a database schema for a hotel management system. Assume that these relations have been populated with suitable data as appropriate, and the underlined attribute is a primary key.

Hotel (hotelNo, hotelName, city)

Room (roomNo, hotelNo, type, price)

Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)

Guest (guestNo, guestName, guestAddress)

where Hotel contains hotel details and hotelNo is the primary key;

Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;

Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key; and

Guest contains guest details and guestNo is the primary key.

Write a relational algebra expression for each of the following data retrieval requirement:

(i) Produce a relation containing the hotel number of those hotels with a room price greater than 50.

(ii) Produce a relation containing the details of all rooms at all hotels.

(iii) Produce a relation containing all hotel names with a room price below 100.

(iv) Produce a relation containing all guests and show the details of any bookings they have beyond 1-Jun-2016.

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

2. What methods do communication scholars use to conduct research?

Answered: 1 week ago

Question

LO4 Specify how to design a training program for adult learners.

Answered: 1 week ago