Question
Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) 1. A) #4.8, identify foreign keys.
Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
1. A) #4.8, identify foreign keys.
B) Typed, plain text file, NOT MS Words document!
Create a (plain text, no format) SQL script file to create this database. Note the following requirements:
-Data types must be suitable.
-For integer numeric type, use integer.
-For character arrays, use char(n) for fixed length and varchar(n) for various length.
-For date, use Date.
B) Primary key for each table, defined correctly.
C) Foreign key assignments are optional.If you assign foreign keys, use the result of your work in #1.
D) The order of the tables being created is VERY important:You cannot reference a table that has not yet been created.
E) Produce some sample tables for these relations that observe the relational integrity rules. Suggest some general
constraints that would be appropriate for this schema.
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