Question: 4 . 5 LAB - Implement supertype and subtype entities ( Sakila ) Similar entities have many common attributes and relationships. Similar entities are often

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: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
Ilustrated in this lab.
n 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:
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
mplement 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).
mplement the belongs_to and works_at relationships as foreign keys:
 4.5 LAB - Implement supertype and subtype entities (Sakila) Similar entities

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!