Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Name one reason why stored procedures are useful What is the main difference bet

ID: 2247435 • Letter: N

Question

Name one reason why stored procedures are useful What is the main difference between a stored procedure and function Materialization is one technique we discussed during a) Transactions b) Views c) Stored procedures d) Joins e) Relational algebra What is the main purpose of a database cursor, as used in a stored procedure? a) To iterate through the rows returned by query b) To keep track of how long the procedure has been executing c) To store input and output parameters to the stored procedure d) To point to the database for rapid query execution e) To execute when database events occur

Explanation / Answer

7) Why stored Procedures are important??
Stored procedure are typically to run some actions, which must be executed together in some order.. They basically don't return a value.. They just execute a bunch of statements together.. There importance is in facts that the Stored procedures are compiled once and stored in executable form, so procedure calls are quick and efficient. Also, as the statements are at one place together, it is reltiavely easy for the Database administrators to optimize them.

8) The main difference between a function and procedure is that a function must return some value while the procedure may or may not.. Also, procedures are kept in compiled form in the db, while the functions are compiled and executed every time when it is called.

9) Materializtion is one technique which is discussed along with Views.

10) Database cursor is used to iterate through the rows returned by query.