Question: Create a script that builds the following database (named MovieDB) using SQL DDL statements. Define the necessary primary keys, foreign keys, and constraints based on
Create a script that builds the following database (named MovieDB) using SQL DDL statements. Define the necessary primary keys, foreign keys, and constraints based on the schema. The table primary key(s) is/are signified by the bold attributes in the table. Choose appropriate data types for each attribute. Lastly, insert at least 5 records into each table to verify the constraints have been fulfilled.
Customers
| CustID | LastName | FirstName |
Inventory
| MediaID | MovieID |
Movies
| MovieID | MovieName |
MovieSupplier
| SupplierID | MovieID | Price |
Orders
| OrderID | SupplierID | MovieID | Copies |
Rentals
| CustomerID | MediaID | CkoutDate | Duration |
Suppliers
| SupplierID | SupplierName |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
