Question
Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) 1. Write the primary key for
Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
1. Write the primary key for the below tables:
Primary Key Constraint for Hotel Table is:
Primary Key Constraint for Room Table is:
Primary Key Constraint for Booking Table is:
Primary Key Constraint for Guest Table is:
2. Write the foreign key for the below tables(If any):
Foreign Key Constraint for Hotel Table is:
Foreign Key Constraint for Room Table is:
Foreign Key Constraint for Booking Table is:
Foreign Key Constraint for Guest Table is:
3. Create Hotel Table with all constraints (for Foreign Key , add ON UPDATE CASCADE ON DELETE CASCADE).
4. Create Room Table with all constraints (for Foreign Key , add ON UPDATE CASCADE ON DELETE CASCADE).
5. Create Booking Table with all constraints (for Foreign Key , add ON UPDATE CASCADE ON DELETE CASCADE).
6. Create Guest Table with all constraints (for Foreign Key , add ON UPDATE CASCADE ON DELETE CASCADE).
7. Create Hotel Table with all constraints (for Foreign Key , add ON UPDATE CASCADE ON DELETE CASCADE).
8. Add unique constraint for Hotel (hotelName)
9. Change the datatype of Hotel(city) to make it Varchar2 (200)
10. Add new column in Hotel Table: Country.
11. Remove Booking Table from the database.
12. What happens if you try to drop Guest Table (that is related with Booking table using Foreign Key constraint)?
Answer the questions:
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
1 Primary Key Constraints Hotel Table hotelNo Room Table roomNo Booking Table No specified primary key please clarify if there is one Guest Table gues...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started