Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Based on the solution of Deliverable 2, provide the SQL statements to create the tables. To get full credit, the CREATE statements must: oHave

1) Based on the solution of Deliverable 2, provide the SQL statements to create the tables. To get full credit, the CREATE statements must:

oHave the correct syntax oInclude all the required fields,oInclude the appropriate data types (as presented in the solution of Deliverable 2),

oInclude the appropriate constraints for primary and foreign keys, oInclude at least one integrity check per table (any one of the following will be fine):Nullability constraint, Check constraint, Unique constraint,Default constraint.

DELIVERABLE:

image text in transcribedimage text in transcribed

1. Shows (Show ID. Name. Release_date, Desar) 2. Genres (Genre ID Short_name Descr) 3. Shows_Genres (Shows genres ID. Show_ID. Genre ID) 4. Plans (Plan ID. Short_name Desar, Fee) 5. Customers (Cust ID, F_name, L_name, Email, Plan ID) 6. Profiles (Profile ID. Name, CustID) 7. Profiles_Genres (Profiles Genres ID. Profile ID. Genre ID 8. Profiles_Shows (Profiles Shows ID. Profile ID. Show ID. Date, Duration, Rating) 9. Payments (Payment ID Date, Amount, CustID) 10. Credit_card (CC No Exp_month, Exp_year Sec_code, CustID) Shows Field Show_ID Name Release_date Descr Data Type MEDIUMINT UNSIGNED VARCHAR(50) DATE TEXT Genres Field Genre ID Short name Desc Data Type MEDIUMINT UNSIGNED TINYTEXT TINYTEXT Shows Genres Field Shows Genres 10 Show 10 Genre ID Date Type INT UNSIGNED AUTO INCREMENT MEDIUMINT UNSIGNED MEDIUMINT UNSIGNED Plans Field Plan 10 Short name Desc Fee Data Type TINYINT UNSIGNED TINYTEXT TINYTEXT DECIMAL (42) Customers Field Cust_ID F_name L name Email Plan_ID Data Type INT UNSIGNED VARCHAR(50) VARCHAR(50) VARCHAR(60) TINYINT UNSIGNED Profiles Field Profile_ID Name Cust ID Data Type INT UNSIGNED TINYTEXT INT UNSIGNED Profiles Genres Field Profiles Genres ID Profile_ID Genre ID Data Type INT UNSIGNED AUTO INCREMENT INT UNSIGNED MEDIUMINT UNSIGNED I Profiles_Shows Field Profiles Shows ID Profile ID Show_ID Date Duration Rating Data Type INT UNSIGNED AUTO INCREMENT INT UNSIGNED MEDIUMINT UNSIGNED DATE DECIMAL (10) DECIMAL (1) Payments Field Payment ID Date Amount CustID Data Type INT UNSIGNED AUTO INCREMENT DATE DECIMAL(10.2) INT UNSIGNED Credit card Field CC No Export Epya Secco Culo Data Type INT UNSIGNED DECIMAL 2) DECIMAL (2 DECIMAL3 INT UNSIGNED

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions