Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . 1 4 LAB - Implement supertype and subtype entities ( Sakila ) Refer to the customer and staff tables of the Sakila database.

2.14 LAB - Implement supertype and subtype entities (Sakila) Refer to the customer and staff tables of the Sakila database. These tables have many columns in common and represent similar entities. Convert the customer and staff entities into subtypes of a new supertype person: 2.14 LAB - Implement supertype and subtype entities (Sakila) Refer to the customer and staff tables of the Sakila database. These tables have many columns in common and represent similar entities. Convert the customer and staff entities into subtypes of a new supertype person: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: - All lower case - Underscore separator between root and suffix - Foreign keys have the same name as referenced primary key Implement supertype and subtype entities as person, customer, and staff tables with primary key person_id. Implement attributes as columns: - All columns are NOT NULL. - The person_id columns have data type SMALLINT 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 dependency relationships between subtype and supertype entities as foreign keys: - The person_id columns of customer and staff become foreign keys referring to person. - Specify CASCADE actions for both relationships. Implement the belongs_to and works_at relationships as foreign keys: - belongs_to becomes an address_id foreign key in person referring to address. - works_at becomes a store_id foreign key in staff referring to store. - Specify RESTRICT actions for both relationships. The address and store tables, with primary keys address_id and store_id, are pre-defined in the zyLab environment. Foreign keys have the same data types as the referenced primary keys: - address_id has data type SMALLINT UNSIGNED. - store_id has data type TINYINT UNSIGNED. If you execute your solution with the Sakila database, you must first drop customer, staff, and all constraints that refer to these table: Use the following statements with Sakila only, not in the zyLab environment:

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

Students also viewed these Databases questions

Question

Compare the different types of employee separation actions.

Answered: 1 week ago

Question

Assess alternative dispute resolution methods.

Answered: 1 week ago

Question

Distinguish between intrinsic and extrinsic rewards.

Answered: 1 week ago