Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following tables form part of a database held in a relational DBMS:- Hotel Room Booking Guest (hotelNo, hotelName, city) (roomNo, hotelNo, type, price) hotelNo,

image text in transcribed

The following tables form part of a database held in a relational DBMS:- Hotel Room Booking Guest (hotelNo, hotelName, city) (roomNo, hotelNo, type, price) hotelNo, guestNo, dateFrom, dateTo, roomNo) (guestNo, guestName, guestAddress) where Hotel contains hotel details and hote INo i Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key; Booking contains details of the bookings and (hotelNo, guestNo, date From) forms the primary key Guest contains guest details and guestNo is the primary key the primary key; and (a) Based on the schema above, describe the relations that would be produced by the following relational algebra operations: 11hotolNo (price >30 (Room) ) Hos1hatlle-Roomhotallid Hotel x Room) n, teltlama (Hotel Hotal hot No-Flo ho 10 (prie 2 Marks] [2 Marks] iii 50 (Room)) ) [3 Marks] Booking kguo-Guest gueatho Guest)+ n,tallo (city-'London (Hotel )) 13 Marks] 12 Marks] 3 Marks V. Guesta (odat T02'l-J2002' (Booking)) vi. Hotel p. Hotal hotoNo-RoomhotelO(price > 50 (Room)) ) (b) Write a relation algebra operation that would the answer for each of the following: i. List the names and addresses of all guests in Kuala Lumpur, alphabetically ordered by name. 13 Marks] ii. List the bookings for which no dateTo has been specified. 3 Marks] 3 Marks 13 Marks] v. Produce the number of guest made bookings for August. 4 Marks] vi. List all guests currently staying at the Grosvenor Hote 4 Marks] iii List the number of rooms in each hotel in London. iv. List the price and type of all rooms at the Ero Hotel

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 Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

10-9 How have social technologies changed e-commerce?

Answered: 1 week ago