This homework involves initilaizing a database schema using the data requirements below, writing SQL scripts to create tables, and populating the tables with data.
Consider the following tables that form part of the DreamHotel database held in a relational DBMS:
Hotel(hotelNo, hotelName, city)
Room(roomNo, hotelNo, type, price)
Booking(bookingNo, guestNo, staffNo, dateFrom, dateTo, roomNo, hotelNo)
Billing(billNo, bookingNo, total)
Guest(guestNo, guestName, guestAddress)
Staff(staffNo, fName, lName, DOB, gender, salary, hotelNo)
1. Initialize the DreamHotel database schema in Workbench.
2. Create Hotel, Room, Booking, Billing, Guest, and Staff tables. Ensure the relevant entity and referntial integrity constraints are enforced.
3. Specify an appropriate general constraint, explain the need for the constraint, and enforce it in the database.
4. Populate the Hotel, Room, and Booking tables with 4 rows each.
5. Delete the following tables and document the process - submit your code and explain what happened when you deleted the tables: