Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . 1 Data Definition Language operationsa. Using SQL queries, create the five ( 5 ) identified tables from the scenario including ALL related Primary
Data Definition Language operationsa. Using SQL queries, create the five identified tables from the scenario including ALL related Primary and Foreign constraints where appropriate. Marksb Store at least five records into each table created in a using INSERT statement. Marks Data Selection and Manipulation Operations a Write a query to change the price of the one of the movies in the TITLE table to using an UPDATE statement. Marks b Display the result of the query after performing the update task in a Marks c Create a report that contains each customers history of renting videos using the SELECT statement. Be sure to include the customers name, title of unavailable movie Rented bookdate of the rental, and duration of rentals calculated as accountrentaldate minus bookdate for the reporting period. Marks Views, Index and Function Stored Procedure a Create a view named MemberInfo that contains all members information. Marks b Obtain and display the result of the created view descending order using member identity. Marks c Create a view named MOVIEVIEW to show the list of movie titles, the availability of each copy, and its expected return date if unavailable rented out Marks d Display all the result of the created view and order the output by the title. Marks e Create an index named titledescription on the description column in the title table. Mark f As a way of giving back to its customers members the management of the rental service has decided to give discount on all movies title selected UNAVAILABLE due to being rented out by its customers. Create a function named "MovieTitleDiscount" that calculates discount for each price in the TITLE table. Marks g Use the created function to calculate the new price. Display the titleid title, current price, and discounted price of the movies. Marks
Data Definition Language operationsa. Using SQL queries, create the five identified tables from the scenario including ALL related Primary and Foreign constraints where appropriate. Marksb Store at least five records into each table created in a using INSERT statement. Marks Data Selection and Manipulation Operations a Write a query to change the price of the one of the movies in the TITLE table to using an UPDATE statement. Marks b Display the result of the query after performing the update task in a Marks c Create a report that contains each customers history of renting videos using the SELECT statement. Be sure to include the customers name, title of unavailable movie Rented bookdate of the rental, and duration of rentals calculated as accountrentaldate minus bookdate for the reporting period. Marks Views, Index and Function Stored Procedure a Create a view named MemberInfo that contains all members information. Marks b Obtain and display the result of the created view descending order using member identity. Marks c Create a view named MOVIEVIEW to show the list of movie titles, the availability of each copy, and its expected return date if unavailable rented out Marks d Display all the result of the created view and order the output by the title. Marks e Create an index named titledescription on the description column in the title table. Mark f As a way of giving back to its customers members the management of the rental service has decided to give discount on all movies title selected UNAVAILABLE due to being rented out by its customers. Create a function named "MovieTitleDiscount" that calculates discount for each price in the TITLE table. Marks g Use the created function to calculate the new price. Display the titleid title, current price, and discounted price of the movies. Marks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started