Knowee
Questions
Features
Study Tools

The following tables form part of a database held in a relational DBMS: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, hoteINo) forms the primary key;Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the primary key;Guest contains guest details and guestNo is the primary key.

Question

The following tables form part of a database held in a relational DBMS: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, hoteINo) forms the primary key;Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the primary key;Guest contains guest details and guestNo is the primary key.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, I can help with that. However, you haven't asked a specific question about the database. Are you looking for help with a specific query or do you need an explanation of how the tables relate to each other? Please provide more details so I can assist you better.

Similar Questions

Charles is developing a travel booking system to manage customers, bookings, and payments. The system needs to handle three main types of data: CUSTOMERS, BOOKINGS, and PAYMENTS. To perform this the user needs to create the following tables with the mentioned constraints: symbol refers to the primary key NN refers to Not NULL After creating the tables, Charles needs to:Alter the CUSTOMERS table to change the primary key to Email to ensure each customer is uniquely identified by their email address.Drop the primary key from the BOOKINGS table as it is no longer required.Note: The user must write only the query to create, alter, and drop the table. The query to display the description of the table is already given.Input format :No console inputOutput format :The output displays the successful table creation status and the structure of all three tablesRefer to the sample output.Sample test cases :Input 1 :Output 1 :Table CUSTOMERS created.Table BOOKINGS created.Table PAYMENTS created.Table CUSTOMERS altered.Table CUSTOMERS altered.Table BOOKINGS altered. Name Null? Type _____________ ___________ ________________ CUSTOMERID NOT NULL NUMBER FIRSTNAME VARCHAR2(100) LASTNAME VARCHAR2(100) EMAIL NOT NULL VARCHAR2(100) Name Null? Type ______________ ___________ ________________ BOOKINGID NOT NULL NUMBER CUSTOMERID NUMBER BOOKINGDATE DATE DESTINATION VARCHAR2(100) Name Null? Type ______________ ___________ _________ PAYMENTID NOT NULL NUMBER BOOKINGID NUMBER AMOUNT NUMBER PAYMENTDATE DATE TABLE_NAME COLUMN_NAME POSITION STATUS _____________ ______________ ___________ __________ CUSTOMERS EMAIL 1 ENABLED 1 row selected.

For the following exercises, use the Hotel schema defined at the start of the Exercises at the end of Chapter 4.5.8 Describe the relations that would be produced by the following relational algebra operations:(a) PhotelNo(sprice . 50(Room))(b) sHotel,hotelNo 5 Room.hotelNo(Hotel 3 Room)(c) PhotelName(Hotel 1Hotel.hotelNo 5 Room.hotelNo(sprice . 50 (Room)))(d) Guest 5 (sdateTo $ ‘1-Jan-2007’(Booking))(e) Hotel 2 Hotel.hotelNo 5 Room.hotelNo(sprice . 50 (Room))(f) PguestName, hotelNo(Booking 1 Booking.guestNo 5 Guest.guestNo Guest) 4 PhotelNo(scity 5 ‘London’(Hotel))5.9 Provide the equivalent tuple relational calculus and domain relational calculus expressions for each of the relationalalgebra queries given in Exercise 5.8.5.10 Describe the relations that would be produced by the following tuple relational calculus expressions:(a) {H.hotelName | Hotel(H) Ù H.city 5 ‘London’}(b) {H.hotelName | Hotel(H) Ù ($R) (Room(R) Ù H.hoteINo = R.hoteINo Ù R.price > 50)}(c) {H.hotelName | Hotel(H) Ù ($B) ($G) (Booking(B) Ù Guest(G) Ù H.hoteINo 5 B.hoteINo ÙB.guestNo 5 G.guestNo Ù G.guestName 5 ‘John Smith’)}(d) {H.hotelName, G.guestName, B1.dateFrom, B2.dateFrom | Hotel(H) Ù Guest(G) Ù Booking(B1) ÙBooking(B2) Ù H.hoteINo 5 B1.hoteINo Ù G.guestNo 5 B1.guestNo Ù B2.hotelNo 5 B1.hotelNo ÙB2.guestNo 5 B1.guestNo Ù B2.dateFrom  B1.dateFrom}5.11 Provide the equivalent domain relational calculus and relational algebra expressions for each of the tuple relationalcalculus expressions given in Exercise 5.10.5.12 Generate the relational algebra, tuple relational calculus, and domain relational calculus expressions for the follow-ing queries:(a) List all hotels.(b) List all single rooms with a price below £20 per night.(c) List the names and cities of all guests.(d) List the price and type of all rooms at the Grosvenor Hotel.(e) List all guests currently staying at the Grosvenor Hotel.(f) List the details of all rooms at the Grosvenor Hotel, including the name of the guest staying in the room, if theroom is occupied.(g) List the guest details (guestNo, guestName, and guestAddress) of all guests staying at the Grosvenor Hotel.5.13 Using relational algebra, produce a report of all employees from the IT and planning departments who are bornafter 1990.The following tables form part of a database held in an RDBMS:Employee (empNo, fName, lName, address, DOB, sex, position, deptNo)Department (deptNo, deptName, mgrEmpNo)Project (projNo, projName, deptNo)WorksOn (empNo, projNo, dateWorked, hoursWorked)where Employee contains employee details and empNo is the key.Department contains department details and deptNo is the key. mgrEmpNo identifies theemployee who is the manager of the department. There is only one manager foreach department.Project contains details of the projects in each department and the key is projNo (notwo departments can run the same project).and WorksOn contains details of the hours worked by employees on each project, and empNo/projNo/dateWorked form the key.

Charles is developing a travel booking system to manage customers, bookings, and payments. The system needs to handle three main types of data: CUSTOMERS, BOOKINGS, and PAYMENTS. To perform this the user needs to create the following tables with the mentioned constraints:

a) Below is a list of potential entities for a hotel database;– Student– Lecturer– CoursesDraw an ERD diagram showing all possible attributes together with PK and FK.

A relational database consists of a collection of

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.