Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the ER diagram shown below. The ER diagram models a hotel chain that owns multiple hotels. Each hotel offers some rooms and each room

image text in transcribed

Consider the ER diagram shown below. The ER diagram models a hotel chain that owns multiple hotels. Each hotel offers some rooms and each room has a number (rnumber). Any room can be booked by any guest. booking hname 1 n m Hotel Room Guest phone# location rnumber size date of stay (passport# name city country A. Give a mapping to the relational model and list the relations and their attributes. Make sure to underline the primary key of each relation and indicate which attributes are foreign keys. (You don't need to draw arrows; you can just mention for each relation which attributes are foreign keys.) B. State the SQL code (using CREATE TABLE) that creates the database schema. o Choose suitable domains for the attributes (rnumber and size are integers; date_of_stay has domain DATE). If the domain of an attribute is unclear, you can simply use VARCHAR(10). o Include the required constraints for primary keys and foreign keys. You do not need to specify "ON DELETE" or "ON UPDATE" clauses. You can omit all NOT NULL constraints

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

Students also viewed these Databases questions