Purchase Solution

Relational Algebra Expressions

Not what you're looking for?

Ask Custom Question

Cannot use SQL - must show expression

Tables in a relational database:
Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)

A) Need to generate the relational algebra expression for the following queries:

1. List all hotels
2. List all single rooms with a price below $50 per night
3. List the names and cities of all guests
4. List the price and type of all rooms at the ABC Hotel
5. List all guests currently staying at the ABC Hotel
6. List the details of all rooms at the ABC Hotel, including the name of the guest staying in the room, if the room is occupied
7. List the guest details (guestNo, guestName, and guestAddress) of all guests staying at the ABC Hotel.

B) Using Relational algebra, create a view of all rooms in the ABC Hotel, excluding price details.

Purchase this Solution

Solution Summary

Relational algebra expressions are examined in the solution.

Purchase this Solution


Free BrainMass Quizzes
Solving quadratic inequalities

This quiz test you on how well you are familiar with solving quadratic inequalities.

Multiplying Complex Numbers

This is a short quiz to check your understanding of multiplication of complex numbers in rectangular form.

Exponential Expressions

In this quiz, you will have a chance to practice basic terminology of exponential expressions and how to evaluate them.

Geometry - Real Life Application Problems

Understanding of how geometry applies to in real-world contexts

Graphs and Functions

This quiz helps you easily identify a function and test your understanding of ranges, domains , function inverses and transformations.