D a statement level before insert or update or delete

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t fires BEFORE the DML Statement. A row level BEFORE INSERT OR UPDATE OR DELETE ON EMP trigger would satisfy the requirement. D. A statement level BEFORE INSERT OR UPDATE OR DELETE ON EMP trigger would satisfy the requirement. Incorrect Answers A & C. If you create a trigger that fires AFTER the DML statement then you would not be able to prevent the EMP table from being modified outside business hours. WWW.ExamMagic.COM - 108: Examine this package: CREATE OR REPLACE PACKAGE BB_PACK IS V_MAX_TEM_SALARY NUMBER(12,2); PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VACHAR 2,V_SALARY NUMBER); END BB_PACk; / CREATE OR REPLACE PACKAGE BODY BB_PACK IS V_PLAYER_AVG NUMBER84,3); www.ExamMagic.com 1Z0-147 PROCEDURE UPD_PLAYER_STAT (V_ID IN NUMBER, V_AB IN NUMBER DEFAULT 4, V_HITS IN NUMBER) IS BEGIN UPDATE PLAYER_BAT_STAT SET AT_BATS = AT_BATS + V_AB, HITS = HITS + V_HITS WHERE PLAYER_ID=V_ID; COMMIT; VALIDATE_PLAYER_STAT(V_ID); END UPD_PLAYER_STAT; PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBERI) IS BEGIN INSERT INTO PLAYER (ID,LAST_NAME, SALARY) VALUES(V_ID,V_LAST_NAME,V_SALARY); UPD_PLAYER_STAT(V_ID,0,0); END ADD_PLAYER; END BB_PACK; If you add an IF statement to the ADD_PLAYER procedure which additional step must you perform? r A Recompile the ADD PLAYER procedure Recompile both the BB PACK specification and body A. Recompile the ADD_PLAYER procedure B. Recompile both the BB_PACK specification and body C. Recompile the BB_PACK specification D. Recompile the BB_PACK body Answer: D Explanation: The only correct option is to ALTER the package body which will cause the package body to recompile. Incorrect Answers A. This procedure is part of the f the BB_PACK Body and it can't be compiled separately. B. The package specification is not referenced by the package body, therefore it is not necessary to recompile the package specification. Only the package body requires recompiling. C. It is not necessary to recompile the package specification because it is not referenced by the package body www.ExamMagic.com 1Z0-147 WWW.ExamMagic. COM - 109: Which statement is true about removing packages? A. You must remove the package body first B. Removing a package specification removes the body too C. Removing the package body removes the specification too D. You must remove both the package body and the specification separately E. Removing a package specification removes all stand alone stored functions named in the specification Answer: B Explanation: Answer D is incorrect To remove the package specification and the package body you use the command: DROP PACKAGE <Package_Name> To remove the package body from the database, you use the following command: DROP PACKAGE BODY <Package_Name> Answer B is the correct response - Removing a package specification removes the body too. WWW.ExamMagic.COM - 110: Which two statements are true about LOBs? (Choose two.) A. BFILES are stored in the database B. All LOBs have read and write access C. NCLOB represents a multi-byte character object D. The Oracle9i server performs implicit conversions between BLOBs and NUMBER data types E. The Oracle9i server performs implicit conversions between CLOBs and VARCHAR2 data types Answer: C, E Explanation: A. The BFILE data type is an external LOB. External LOBs are stored outside the database in operating system files. www.ExamMagic.com 1Z0-147 B. BFILEs are read-only, and they cannot participate in transactions that occur within the database. D. You can perform Implicit conversions between LONG and CLOB columns and RAW and BLOB columns but you can't implicitly convert between BLOBS and NUMBER. WWW.ExamMagic.COM - 111: You want to create procedures, functions and packages Which privilege do you need? A. EXECUTE CODE object privilege B. CREATE ANY CODE object privilege C. CREATE PACKAGE system privilege D. CREATE PROCEDURE system privilege E. CREATE FUNCTION, CREATE PROCEDURE, CREATE PACKAGE system privileges Answer: D Explanation: The privilege CREATE PROCEDURE gives the grantee the right to create procedures, functions, and packages within their schema. This privilege does not give the right to drop or alter the program constructs. Incorrect Answers A, B & C are not valid object or system privileges. www.ExamMagic.com...
View Full Document

This note was uploaded on 01/05/2011 for the course COMS 131 taught by Professor Dad during the Spring '10 term at University of Mumbai.

Ask a homework question - tutors are online