Create the Toplevelcust View Described in Review Question 2 Display the Data in the View
solved#2405241 - For Prof_Baron Forum and wk3 assighnment help
Describe the purpose and use of views and stored procedures in the relational databases. What is the difference between them and what are their advantages and disadvantages. Provide one example of a situation in which y'all would not use a view. Provide i case of when you would use a stored procedure. At least 250 words. Then at least 150 words in a peer response to this forum post..A view, likewise known as a virtual table, is a searchable object in the database that is defined by a query. Using the create view command, y'all tin can create an easily digestible view which shows specific information form select tables in the database. This is useful for security purposes as well as keeping unwanted eyes from viewing certain bits of data. For case, you could allow all employees to see anybody's hire date, piece of work number, and job title, while keeping salary and social security numbers subconscious. Can't have the rabble knowing who gets paid more than whom, and just allowing anyone access to personally identifiable information (that's correct, I worked in PII, lord knows how proud my security director would exist if she knew I did) is a massive no-no. A stored procedure is a set of SQL statements stored in a database in a compiled form, ensuring it can be easily accessed and run by immune users. This is useful as it allows users to change what data to search, only not the process used to perform the search. (Query, I should use the give-and-take query more oft, probably) This is great if y'all take to print out a daily gear up of information pulled from the database. As for the slap-up "allow them fight" debate, it really comes down to what you desire. Stored procedures accepts parameters, while views don't. A view can exist used to build a larger query, estimate who can't. Stored procedures tin modify tables, views can only pull data from tables. It really does come up down to what do you desire. Off-white dealing, I know nothing about any of this stuff, and used the following websites to help me non sound similar an early on morning dullard on the topics. ——————————————————————————————————————————————–Assignment three assistance. Premiere Products Exercises In the post-obit exercises, you will employ the data in the Premiere Products database shown in Figure 2-one in Chapter ii. (If yous utilise a computer to complete these exercises, use a re-create of the original Premiere Products database so your data volition not reflect the changes you made in Chapter iii.) If you have admission to a DBMS, use the DBMS to perform the tasks and explain the steps you used in the process. If not, explain how yous would apply SQL to obtain the desired results. Bank check with your instructor if yous are not certain about which arroyo to take.1. Create the TopLevelCust view described in Review Question 2. Display the data in the view. two. Create the PartOrder view described in Review Question 3. Display the data in the view. 3. Create a view named OrdTot. Information technology consists of the gild number and order full for each guild currently on file. (The order total is the sum of the number ordered multiplied by the quoted toll on each guild line for each lodge.) Display the information in the view. iv. Create the following indexes. If it is necessary to name the index in your DBMS, use the indicated proper name. a. Create an alphabetize named PartIndex1 on the PartNum field in the OrderLine table. b. Create an index named PartIndex2 on the Warehouse field in the Part tabular array. c. Create an alphabetize named PartIndex3 on the Warehouse and Grade fields in the Part table. d. Create an alphabetize named PartIndex4 on the Warehouse and OnHand fields in the Part table and list units on hand in descending social club. 5. Drop the PartIndex3 index. 6. Assume the Part table has been created, but there are no integrity constraints. Create the necessary integrity constraint to ensure that the just allowable values for the Class field are AP, HW, and SG. Ensure that the PartNum field is the primary primal and that the PartNum field in the OrderLine table is a strange key that must match the master central of the Part table. 7. Add a field named Allocation to the Part tabular array. The resource allotment is a number representing the number of units of each role that have been allocated to each customer. Set all Allocation values to aught. Calculate the number of units of part number KV29 currently on society. Modify the Resource allotment value for office number KV29 to this number. Display all the data in the Part table. 8. Increase the length of the Warehouse field in the Function table to ii characters. Change the warehouse number for warehouse 1 to 1a. Display all the data in the Part table. 9. Delete the Allotment field from the Part table. Display all the data in the Role tabular array. 10. What control would you employ to delete the Part tabular array from the Premiere Products database? (Do not delete the Part table.) 11. Write a stored process that volition change the price of a part with a given part number. How would you use this stored procedure to change the price of office AT94 to $26.95? 12. Write the code for the following triggers following the style shown in the text. a. When adding a customer, add the customer's balance times the sales rep's committee rate to the commission for the respective sales rep. b. When updating a customer, add the departure between the new balance and the old balance multiplied by the sales rep's committee charge per unit to the commission for the corresponding sales rep. c. When deleting a customer, subtract the remainder multiplied by the sales rep'southward commission charge per unit from the commission for the corresponding sales rep. thirteen. If you are using Access 2010, create the following information macros. a. Create a data macro associated with the After Insert event for the Customer table to implement the trigger in Step 12a. Test the data macro by calculation a customer and ensuring that the corresponding sales rep's commission is updated correctly. b. Create a data macro associated with the Afterwards Update consequence for the Customer tabular array to implement the trigger in Step 12b. Examination the information macro by changing a customer's balance and ensuring that the corresponding sales rep's committee is updated correctly. c. Create a data macro associated with the After Delete event for the Client table to implement the trigger in Step 12c. Examination the information macro by deleting a client and ensuring that the respective sales rep'southward commission is updated correctly.
info221wk3.cypher
Unformatted Attachment Preview
Don't utilise plagiarized sources. Go Your Custom Essay on
For Prof_Baron Forum and wk3 assighnment assistance
Just from $13/Page
…
Purchase answer to see total
attachment
Source: https://herawriters.com/?p=2405241
Post a Comment for "Create the Toplevelcust View Described in Review Question 2 Display the Data in the View"