You are on page 1of 3

Test: Quiz: Introduction to Triggers Bekijk uw antwoorden, feedback en scores hieronder.

Een asterisk (*) geeft een goed antwoord aan. Section 1 (Beantwoord alle vragen in deze sectie.) 1. You can use a database trigger to prevent invalid transactions from being committed. True or False? Waar (*) Niet waar Correct 2. Which of the following could NOT be done by a database trigger? Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten

Enforcing a complex business rule Enforcing a complex database security check Recalculating the total salary bill for a department whenever an employee's salary is changed Ensuring that a student never arrives late for a class (*) Keeping a log of how many rows have been inserted into a table Correct 3. Which of the following are NOT allowed within a database trigger? (Choose two) (Kies alle goede antwoorden.) COMMIT (*) A call to a packaged procedure INSERT A Boolean variable SAVEPOINT (*) Correct 4. While editing a document in Microsoft Word, you go to the FILE menu and SAVE your work. To do this, Microsoft Word has executed an application trigger. True or False? Waar (*) Niet waar Correct 5. Which of the following events could NOT automatically fire a database trigger? A user logging on to the database A SQL INSERT statement You click your mouse on a button to choose the correct answer to this question (*) Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten

packproc. A database trigger is a PL/SQL stored subprogram which is explicitly invoked just like a procedure or a function.. These subprograms have no parameters. Which of the following are good guidelines to follow when creating triggers? (Choose two) (Kies alle goede antwoorden. mytrigg. True or False? Waar Niet waar (*) Correct 8. A user's schema contains procedure MYPROC. use triggers to enforce NOT NULL constraints Avoid lengthy trigger logic by creating a procedure and invoking it from within the trigger (*) Use triggers to replace functionality which is already built into the database Always create more triggers than you need.) Be aware of recursive and cascading effects (*) Where possible. and the function returns a NUMBER. Which of the following best describes a database trigger? Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten It allows users to log on to the database It executes automatically whenever a particular event occurs within the database (*) It prevents unique constraints from being violated It executes automatically whenever a user clicks on a button with their mouse It allows foreign key constraints to be violated Correct . v_number := myfunc. function MYFUNC.) mypack. (*) myproc. trigger MYTRIGG and package MYPACK which contains a public procedure PACKPROC. (*) Correct 7. Which of the following calls to these objects (from an anonymous block) are incorrect? (Choose two) (Kies alle goede antwoorden.. because it is better to be safe Correct 9.A DML operation on a view The Database Administrator shuts down the database Correct 6. IF NOT myfunc THEN .

10. True or False? Waar Niet waar (*) Correct Markeren voor nakijken (1) Punten . but it is better to use a database trigger. We could enforce this rule using a check constraint. A business rule states that an employee's salary must be between 4000 and 30000.