Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use your knowledge of DDL in MySq 1 Workbench to answer the following: ( answers should be working SQL statements 1 - Create a new
Use your knowledge of DDL in MySq Workbench to answer the following: answers should be working SQL statements
Create a new database named hotels.
Create the tables Hotel, Room, Booking and Guest with the following columns Declare the corresponding primary and foreign keys: corresponding rows are deleted or updated from the referencing table if that row is deleted or updated from the arent table. a Hotel
a Hotel Table:
b Room Table:
c Guest Table:
d Booking Table:
Add a referential integrity constraint FK constraints on the attribute 'roomNo' from booking table to refer to the attribute 'roomNo' in room table.
Lab instructors: Dr Mona Alghamdi & L Sameerah Albalhareth Add a new column to the guest table to represent the guest's gender. Name the column 'gender' of type char 'gender' of type char Add a constraint to column 'gender' in the guest table to limit the possible values to F or Mnote: CHECK might not work with MySQL Workbench, can you think of a way to make it work? Modify the column 'type' in the room table to have a default value of "single" Delete the column 'price' from the room table Populate your tables with records at least in every table. Include the INSERT statements and screenshots of the final tables after insertions.Lab instructors: Dr Mona Alghamdi & L Sameerah AlbalharethCIS : Database Concepts & Design
tableguestroomNo,hotelNo,dateTo,dateFromb
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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