Question: Hello!!! This needs to be done in SQL Server (Murach's Book); Create the tables described below and make sure to use appropriate constraints: Movies Rentals
Hello!!! This needs to be done in SQL Server (Murach's Book);
Create the tables described below and make sure to use appropriate constraints:
Movies Rentals
mid ---------------- rid
title --------------- mid(fk)
outstanding ------------ rental_date
---------------------------------return_date
The Movies table has 3 columns. The mid column is the primary key and can be any data type. The title column should be character and required. The outstanding column should be numeric and should default to 0 when a record is added. The outstanding column will be used to maintain the number of outstanding rentals for the indicated movie and will be maintained with the database triggers described in problems 2 and 3.
The Rentals table has 4 columns. The rid column is the primary key and should be numeric. The mid column should be the same data type as the mid column in the Movies table and will be a foreign key. The rental_date and return_date columns should be date data types.
Add 3 records to the Movies table. Use any values you want. Enclose the insertions in a transaction. Make sure to commit.
Thank you!!!
?
| |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
