INSY 3432 Database Systems Assignment

Added on - 19 Sep 2019

Trusted by +2 million users,
assist thousands of students everyday
Showing pages 1 to 1 of 3 pages
INSY 3432 Data Base SystemsHome Work 7 Fall 2016Q1:In the class, we did an exercise where each movie in the database was given a label, Short, Medium,or Long. This output was simply printed to the screen. Rewrite this procedure to the following.1.In the movies database, create a new Column calledDuration(which table?)2.Modify the stored procedure. Do not print the message to the screen. Instead, write the labelShort, Medium, or Long into that column of the table. Execute this procedure with appropriateparameters.3.Next write an SQL query to display all the short film names, their run time in minutes and theirduration label. This is just to check that your stored procedure worked.As always, for each part of the question, submit the query by snipping and pasting into a worddocument. Snip and paste the results as well. If the results of 3 exceed 10 lines, copy and paste onlythe first 10 lines of output, but mention how many lines of output was returned.Q2:For this question, you need to use theAllApplianceCo .mdfdatabase available on BB. You needsome preparatory work before you can do the question.1.First of all you need to execute the stored proceduresp_discountthat we wrote in class. If youalready executed this in class, there is no need to repeat this process. After it executes, makesure that the discount table has discount specified for quantities from 0 thru 1000. Unless thediscount table is updated thus, you will not be able to change any inventory levels in theInventory table.2.The idea of this question is that some sales transactions have taken place, and you want toprocess all these transactions to update your inventory levels for each product in each store.You are provided two SQL scripts. 1) a SQL script to create a table (Sales) in the AllApplianceCodatabase. Study the script to understand the table. Create the table by executing the script.While the table is created, it is still empty. You need to populate the table with actual sales data.3.You are provided a second script to insert data into the sales table. Execute this script as welland you will have the sales table, withsalesIDas the primary Key.Once steps 1 thru 3 are completed, you are ready to begin the work on the question.1
You’re reading a preview
Preview Documents

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document