Tag: databases

Questions Related to databases

  1. Explicit Cursor

  2. Implicit Cursor

  3. Active Data Set

  4. None of the above


Correct Option: B
  1. A stored procedure on the server.

  2. A block of code in a PL/SQL library.

  3. A standalone procedure on the client machine.

  4. A block of code in the body of the program unit ORDERTOTAL.

  5. A local subprogram defined within the program unit ORDERTOTAL.


Correct Option: E

Implicit cursors are declared for

  1. Some DML,PL/SQL statements

  2. All DML,PL/SQL statements

  3. Only PL/SQL statements

  4. None of the Above


Correct Option: B
  1. Raise Application procedure

  2. Raise Application Error procedure

  3. Application Error procedure

  4. None of the Above


Correct Option: B

How do you handle an Exception?

  1. Trap it with a Handler

  2. Propagate it to the Calling Environment

  3. a & then b

  4. b & then a


Correct Option: C

Examine this procedure: CREATE OR REPLACE PROCEDURE DELETE_PLAYER(V_IDIN NUMBER) IS BEGIN DELETE FROM PLAYER WHERE ID = V_ID EXCEPTION WHEN STATS_EXIST_EXCEPTION THEN DBMS_OUTPUT.PUT_LINE(Cannotdeletethisplayer, childrecordsexistin PLAYER_BAT_STAT table); END; What prevents this procedure from being created successfully?

  1. A comma has been left after the STATS_EXIST_EXCEPTION exception.

  2. The STATS_EXIST_EXCEPTION has not been declared as a number.

  3. The STATS_EXIST_EXCEPTION has not been declared as an exception.

  4. None


Correct Option: C

AI Explanation

To answer this question, let's go through each option and understand why it is correct or incorrect:

Option A) A comma has been left after the STATS_EXIST_EXCEPTION exception.

This option is incorrect because there is no comma after the STATS_EXIST_EXCEPTION exception in the given procedure. Therefore, this is not the reason preventing the successful creation of the procedure.

Option B) The STATS_EXIST_EXCEPTION has not been declared as a number.

This option is incorrect because the STATS_EXIST_EXCEPTION is not required to be declared as a number. It is used as an exception in the procedure.

Option C) The STATS_EXIST_EXCEPTION has not been declared as an exception.

This option is correct because the STATS_EXIST_EXCEPTION has not been declared as an exception in the given procedure. In order to use an exception, it needs to be declared beforehand using the EXCEPTION keyword followed by the exception name.

Option D) None

This option is incorrect because, as explained above, the STATS_EXIST_EXCEPTION has not been declared as an exception in the given procedure, which prevents the successful creation of the procedure.

The correct answer is C. The STATS_EXIST_EXCEPTION has not been declared as an exception. This option is correct because the exception needs to be declared before it can be used in the procedure.

Under which two circumstances do you design database triggers? (Choose two)

  1. To duplicate the functionality of other triggers.

  2. To replicate built-in constraints in the Oracle server such as primary key and foreign key.

  3. To guarantee that when a specific operation is performed, related actions are performed.

  4. For centralized, global operations that should be fired for the triggering statement, regardless of which user or application issues the statement.


Correct Option: C,D

Which two statements about the overloading feature of packages are true? (Choose two)

  1. Only local or packaged sub programs can be overloaded.

  2. Overloading allows different functions with the same name that differ only in their return types.

  3. Overloading allows different subprograms with the same number, type and order of the parameter.

  4. Overloading allows different subprograms with the same name and same number or type of the parameters.

  5. Overloading allows different subprograms with the same name but different in either number or type or order of parameter.


Correct Option: A,E

AI Explanation

To answer this question, we need to understand the concept of overloading in packages.

Option A) Only local or packaged subprograms can be overloaded. This option is true. Overloading in packages allows us to define multiple subprograms with the same name, but they must be either local or packaged subprograms.

Option B) Overloading allows different functions with the same name that differ only in their return types. This option is false. Overloading in packages does not allow different functions with the same name that differ only in their return types. Overloading is based on the parameters, not the return types.

Option C) Overloading allows different subprograms with the same number, type, and order of the parameter. This option is false. Overloading does not consider the order of the parameters. It only considers the number and types of the parameters.

Option D) Overloading allows different subprograms with the same name and the same number or type of the parameters. This option is false. Overloading allows different subprograms with the same name, but they must have different number or type of parameters.

Option E) Overloading allows different subprograms with the same name but different in either number or type or order of the parameter. This option is true. Overloading in packages allows us to define multiple subprograms with the same name, but they must have different number or type or order of parameters.

Therefore, the correct statements about the overloading feature of packages are A) Only local or packaged subprograms can be overloaded, and E) Overloading allows different subprograms with the same name but different in either number or type or order of the parameter.

  1. An existing will be dropped and it will be replaced by the new version.

  2. An existing will be dropped and it will not be replaced by the new version.

  3. No change will occur

  4. There is no such option available in creating procedures.


Correct Option: A

Which two statements about packages are true? (Choose two)

  1. Packages can be nested.

  2. You can pass parameters to packages.

  3. A package is loaded into memory each time it is invoked.

  4. The contents of packages can be shared by many applications.

  5. You can achieve information hiding by making package constructs private.


Correct Option: D,E