Question: 1 Given the following relational database schema: VIDEO= ( Title, RentalFee, NumberOfDaysAllowed, Rating) CUSTOMER= (FullName, PhoneNumber, Address, CreditCardN) RENTALTRANSCATION= ( ID, Title, DateCheckOut, DateReturn, TotalFee,

1 Given the following relational database schema:

VIDEO= ( Title, RentalFee, NumberOfDaysAllowed, Rating)

CUSTOMER= (FullName, PhoneNumber, Address, CreditCardN)

RENTALTRANSCATION= ( ID, Title, DateCheckOut, DateReturn, TotalFee, PhoneNumber, FullName)

Assume all dates are before the date of today and you may use <, >, =, and <> to compare any two dates. Write DDL statements to create the above tables and use appropriate data types for the attributes. The DDL statement must include at least the following constraints:

Every Primary Key;

Every Foreign Key;

For every Foreign Key constraint, the referential integrity constraints are:

ON DELETE SET NULL or CASCADE or DEFAULT whatever it is appropriate;

ON UPDATE SET NULL or CASCADE whatever it is appropriate;

Rating is either PG, PG13, or R;

TotalFee = ( DateReturn DateCheckOut)* RentalFee;

RentalFee >0;

RentalFee is not Null;

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!