Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What does this key public know about this issue?

Answered: 1 week ago

Question

What is the nature and type of each key public?

Answered: 1 week ago

Question

What does this public need on this issue?

Answered: 1 week ago