Week 9 Textbook assignment

Week 9 Textbook assignment - network traffic and increase...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Review Questions: Chapter 8: 4, 5, 6, 17, 18 4. Alice Cardoza, John Cretchakov, Anne McDonald, John Cretchakov, Mary Chen 5. John Cretchakov 6. Alice Cardoza, Anne McDonald 17. A trigger is a procedural SQL code that is automatically invoked by the RDBMS upon the occurrence of a given data manipulation event. A trigger is invoked before or after a data row is inserted, updated, or deleted. A trigger is associated with a given database table. Each table may have more than one trigger. A trigger is executed as part of the transaction that triggered it. They can be used to enforce constraints that cannot be enforced at the DBMS design and implementation level. 18. Stored procedures are a named group of procedural and SQL statements that return a value. They can only be run from within a stored procedure or a trigger, they cannot be run from SQL statements. They reduce
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: network traffic and increase performance because they are stored at the server and do not get transmitted from a terminal to the server. They also reduce code duplication by code isolation and code sharing minimizing the number of errors and reducing the cost of development and maintenance. For example, if you are using the same query over and over again, it would make sense to put it into a stored procedure. When you put this SQL statement in a stored procedure, you can then run the stored procedure from the database's command environment. Problems: Chapter 7: 19, 20 SELECT CUS_CODE, INV_NUMBER, P_DESCRIPT, LINE_UNITS AS UNITS BOUGHT, LINE_PRICE AS UNIT PRICE, LINE_UNITS*LINE_PRICE AS SUBTOTAL FROM INVOICE, LINE, PRODUCT...
View Full Document

This note was uploaded on 08/02/2009 for the course IST 210 taught by Professor Mcconn,charlotteryoo,jungwoo during the Summer '08 term at Penn State.

Ask a homework question - tutors are online