Tag: databases

Questions Related to databases

Examine this code CREATE OR REPLACE TRIGGER SECURE_emp BEFORE LOGON ON EMP BEGIN ............. END WHAT TYPE OF TRIGGER IS IT ?

  1. DML trigger

  2. Invalid Trigger

  3. Application Trigger

  4. System Event trigger


Correct Option: B

AI Explanation

To determine the type of trigger in the given code, let's examine the options:

A. DML trigger - DML triggers are used to execute specific actions before or after data manipulation language (DML) statements, such as INSERT, UPDATE, or DELETE. However, the code provided does not specify any DML statements, so this option is incorrect.

B. Invalid Trigger - This option is correct. The code is incomplete and does not contain any specific logic or actions inside the trigger. Therefore, it is an invalid trigger.

C. Application Trigger - Application triggers are custom triggers that are specifically designed for a particular application. The given code does not provide any information suggesting that it is an application trigger, so this option is incorrect.

D. System Event Trigger - System event triggers are triggered by system-level events, such as system startup or shutdown. The given code does not specify any system events, so this option is incorrect.

Therefore, the correct answer is B. Invalid Trigger. The code provided is incomplete and does not contain any specific logic or actions inside the trigger.

  1. we can use Application Trigger to fire when a DELETE statement occurs

  2. we can use database Trigger to fire when a INSERT statement occurs

  3. we can use System event Trigger to fire when a DELETE statement occurs

  4. we can use INSTEAD OF trigger to fire when a INSERT statement occurs


Correct Option: B
  1. DURING

  2. INSTEAD

  3. ON SHUTDOWN

  4. BEFORE


Correct Option: D
  1. Package

  2. Stored function

  3. Stored procedure

  4. Another DB trigger


Correct Option: C
  1. DELETE TRIGGER business_hour

  2. DROP TRIGGER business_hour

  3. REMOVE TRIGGER business_hour

  4. ALTER TRIGGER business_hour remove


Correct Option: B
  1. Row level DML trigger

  2. Statement level DML trigger

  3. System trigger

  4. Application Trigger


Correct Option: A
  1. ALTER TRIGGERS ON TABLE EMP DISABLE

  2. ALTER EMP DISABLE ALL TRIGGERS

  3. NOT POSSIBLE TO DISABLE TRIGGERS

  4. ALTER TABLE EMP DISABLE ALL TRIGGERS


Correct Option: D

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Full table scan

  2. Table access by ROWID

  3. Access via unique index

  4. Primary key access


Correct Option: B