Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the belongs _ to and works _ at relationships as foreign keys: belongs _ to becomes an address _ id foreign key in person

Implement the belongs_to and works_at relationships as foreign keys:
belongs_to becomes an address_id foreign key in person with data type SMALLINT UNSIGNED.
works_at becomes a store_id foreign key in staff with data type TINYINT UNSIGNED.4.5 LAB - Implement supertype and subtype entities (Sakila)
Similar entities have many common attributes and relationships. Similar entities are often converted into subtypes of a supertype entity, as
illustrated in this lab.
In the Sakila database, the customer and staff tables have several common columns. Convert these tables into subtypes of person.
Specifically, write CREATE TABLE statements for person, customer, and staff that implement this ER diagram:
address
belor
Follow Sakila conventions for table and column names:
All lower case
Underscore separator between root and suffix
Foreign keys have the same name as referenced primary key
Implement attributes as columns:
The primary key of all three tables is person_id with data type SMALIINT UNSIGNED.
The last_update and create_date columns have data type TIMESTAMP.
The picture column has data type BLOB.
All other columns have data type VARCHAR (20).
Implement the belongs_to and works_at relationships as foreign keys:
image text in transcribed

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

LO2 Identify components of workflow analysis.

Answered: 1 week ago