Answered step by step
Verified Expert Solution
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
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
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