Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Problem 3. (20 points) Understanding of Relational Algebra Consider the following relational schema from which the underlined represent information about a hotel, employees, rooms, and

image text in transcribed

Problem 3. (20 points) Understanding of Relational Algebra Consider the following relational schema from which the underlined represent information about a hotel, employees, rooms, and guests fields represent the keys to Guest (guestld integer, name: string, address: string) Hotel guests GuestStav(questld: integer check-in-date: date check-out-date: date roomld integer) - Guest reservation history Employee (employeeld: integer, e-name: string) Hotel employees Room (roomld: integer, floornumber: integer, room-capacity: integer, empty: Boolean) - Hotel rooms Receptionist (employeeld: integer, desk-type: string, hours-per-day: double) Hotel receptionists Cleaning-Staff (employeeld: integer, floornumber: integer, hours-per-day: double) - Assignment of floors to clean Cleaning-Assignment (employeeld integer, roomld integer); Assignment of rooms to clean Problem 3 (Continuation) c) 5 pts) Write a relational expression for the following query: Find the name and id for all guess who siayed in the hotel more than wo times berween March 13, 2010 and June 18, 2010 d) (5 pts) Write a relational expression for the following query: Find the nane and id for all guests who stayed more than three days in a room cleaned by employee 123. Assume the existence of a finction named days between (datel, date2) which returns the number of days passed between date1 and date2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions