Ask a question to Desklib · AI bot


INSY 3432 Database Systems Assignment

Added on -2019-09-19

| INSY 3432
| 3 pages
| 1000 words

Trusted by 2+ million users,
1000+ happy students everyday

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 called Duration (which table?) 2.Modify the stored procedure. Do not print the message to the screen. Instead, write the label Short, Medium, or Long into that column of the table. Execute this procedure with appropriate parameters.3.Next write an SQL query to display all the short film names, their run time in minutes and their duration 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 word document. Snip and paste the results as well. If the results of 3 exceed 10 lines, copy and paste only the first 10 lines of output, but mention how many lines of output was returned.Q2: For this question, you need to use the AllApplianceCo .mdf database available on BB. You need some preparatory work before you can do the question.1.First of all you need to execute the stored procedure sp_discount that we wrote in class. If you already executed this in class, there is no need to repeat this process. After it executes, make sure that the discount table has discount specified for quantities from 0 thru 1000. Unless the discount table is updated thus, you will not be able to change any inventory levels in the Inventory table.2.The idea of this question is that some sales transactions have taken place, and you want to process 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 AllApplianceCo database. 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 well and you will have the sales table, with salesID as the primary Key.Once steps 1 thru 3 are completed, you are ready to begin the work on the question.1

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this