0

databases Online Quiz - 82

Description: databases Online Quiz - 82
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Which two parameters can be set to tell the Oracle to use OMF (Oracle Managed Files)?

  1. DB_CREATE_FILE_DEST

  2. DB_CREATE_ONLINE_LOG_n

  3. USER_DUMP_DEST

  4. LOG_ARCHIVE_DEST


Correct Option: A

Why is searching for large-table full-table scans critical to SQL tuning?

  1. They indicate an optimized execution plan.

  2. They may be able to be tuned to use an index

  3. The full-table scan should be normalized from the database design

  4. A full-table scan is always sub-optimal.


Correct Option: B

Which character is used to continue a statement in SQL*Plus?

  1. / '

    • '
    • '
  2. = '


Correct Option: C

AI Explanation

To answer this question, you need to understand how statements are executed in SQL*Plus.

In SQL*Plus, a hyphen (-) character is used to continue a statement onto the next line.

Option A) / ' - This option is incorrect because the forward slash (/) character is used to execute a SQL or PL/SQL statement in SQL*Plus, but it is not used to continue a statement onto the next line.

Option B) * ' - This option is incorrect because the asterisk (*) character is not used to continue a statement in SQL*Plus.

Option C) - ' - This option is correct because the hyphen (-) character is used to continue a statement onto the next line in SQL*Plus.

Option D) = ' - This option is incorrect because the equal sign (=) character is not used to continue a statement in SQL*Plus.

The correct answer is Option C) - '. This option is correct because the hyphen (-) character is used to continue a statement onto the next line in SQL*Plus.

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

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

  1. 8

  2. 3

  3. 2

  4. 4


Correct Option: B

What best describes the relationship between indexes and SQL performance?

  1. Indexes are only used in special cases

  2. Indexes are used to make table storage more efficient

  3. Indexes rarely make a difference in SQL performance

  4. Indexes exist solely to improve query speed


Correct Option: D

Which is a major problem with SQL?

  1. SQL cannot support object-orientation

  2. The same query can be written in many ways, each with vastly different execution plans.

  3. SQL syntax is too difficult for non-computer professionals to use

  4. SQL creates excessive locks within the database


Correct Option: B

What was a problem with navigational data access languages?

  1. The user had to have knowledge of the table and index structures

  2. Navigational data access was far slower than declarative access.

  3. Navigational access languages required the coder to embed their queries inside a procedural language shell.

  4. Navigational languages were far slower then SQL


Correct Option: A

Which of the following are valid table-partitioning methods?

  1. Range

  2. Freelist

  3. Hash

  4. Index


Correct Option: C

INTERVAL PARTITIONING IS NOT SUPPORTED FOR INDEX-ORGANIZED TABLES.

  1. True

  2. False


Correct Option: A

CAN WE SPECIFY MULITPLE PARTITIONING KEY COLUMNS IN INTERVAL PARTITIONING TECHNIQUE

  1. True

  2. False


Correct Option: B

CAN WE SPECIFY VARCHAR DATATYPE FOR THE PARTITIONING KEY IN INTERVAL PARTITIONING TECHNIQUE

  1. True

  2. False


Correct Option: B

IS IT POSSIBLE TO SPECIFY THE EXECUTION ORDER OF TRIGGERS IN ORACLE 10G

  1. True

  2. False


Correct Option: B

CAN SIMPLE_INTEGERS CONTAIN NULL VALUES

  1. True

  2. False


Correct Option: B

REGEXP_COUNT TAKES STRING AND REGULAR EXPRESSION AND RETURNS NUMBER OF TIMES THE EXPRESSION IS PRESENT IN THE STRING

  1. True

  2. False


Correct Option: A

INTERVAL PARTITIONING IS A PARTITIONING TECHNIQUE BASED ON

  1. HASH

  2. MODULUS

  3. RANGE

  4. RANDOM


Correct Option: C

Need to create a trigger on the EMP table that monitors every row that is changed and place this info into the AUDIT_TABLE What type of Trigger to be used ?

  1. FOR EACH ROW trigger on the EMP table

  2. Statement-level Trigger on the EMP table

  3. FOR EACH ROW trigger on the AUDIT_TABLE table

  4. Statement-level Trigger on the AUDIT_TABLE


Correct Option: A

AI Explanation

To answer this question, you need to understand the different types of triggers in SQL.

Option A) FOR EACH ROW trigger on the EMP table - This option is correct because it specifies a trigger that is fired for each row that is changed in the EMP table. In this case, the trigger will be used to monitor every row that is changed in the EMP table and place the information into the AUDIT_TABLE.

Option B) Statement-level Trigger on the EMP table - This option is incorrect because a statement-level trigger is fired only once for each SQL statement, regardless of the number of rows affected. It would not be suitable for monitoring every row that is changed in the EMP table.

Option C) FOR EACH ROW trigger on the AUDIT_TABLE table - This option is incorrect because it specifies a trigger on the AUDIT_TABLE table, not the EMP table. The requirement is to create a trigger on the EMP table.

Option D) Statement-level Trigger on the AUDIT_TABLE - This option is incorrect because it specifies a statement-level trigger on the AUDIT_TABLE, which would not be suitable for monitoring every row that is changed in the EMP table.

The correct answer is A) FOR EACH ROW trigger on the EMP table. This option is correct because it specifies a trigger that is fired for each row that is changed in the EMP table, which is what is required in this case.

what part of DB trigger determines the number of times the trigger body executes ?

  1. Trigger type

  2. Trigger body

  3. Trigger event

  4. Trigger Timing


Correct Option: A

AI Explanation

To answer this question, you need to understand the different components of a database trigger.

A database trigger is a stored procedure that is automatically executed in response to a specific event in the database. The trigger body contains the set of SQL statements that are executed when the trigger is fired.

The trigger type determines the number of times the trigger body executes. There are two types of triggers:

  1. Statement-level triggers: These triggers are fired once for each triggering event, regardless of the number of rows affected. This means that the trigger body is executed only once for each triggering event, regardless of the number of rows involved in the event.

  2. Row-level triggers: These triggers are fired once for each row affected by the triggering event. If the triggering event affects multiple rows, the trigger body is executed once for each affected row.

In this case, the correct answer is A) Trigger type because it determines the number of times the trigger body executes. The other options are not directly related to determining the number of times the trigger body executes.

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.

CREATE OR REPLACE TRIGGER update_emp AFTER UPDATE ON EMP BEGIN INSERT INTO AUDIT_TABLE values(user ,sysdate ); END ; you issue an update command in the EMP tables that result in a update of 10 rows. How many rows are inserted into the AUDIT_TABLE ?

  1. 1

  2. 10

  3. none

  4. Value equal to number of rows in EMP table


Correct Option: A

AI Explanation

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

Option A) 1 - This option is correct because the trigger update_emp is fired after an update is performed on the EMP table. The trigger inserts a single row into the AUDIT_TABLE with the value of the user and the current date and time. Since the trigger is fired only once, regardless of the number of rows updated, only one row will be inserted into the AUDIT_TABLE.

Option B) 10 - This option is incorrect because the trigger only inserts one row into the AUDIT_TABLE, regardless of the number of rows updated in the EMP table.

Option C) none - This option is incorrect because the trigger does insert a row into the AUDIT_TABLE after the update on the EMP table.

Option D) Value equal to the number of rows in the EMP table - This option is incorrect because the trigger only inserts one row into the AUDIT_TABLE, regardless of the number of rows in the EMP table.

The correct answer is A) 1. This option is correct because the trigger update_emp inserts a single row into the AUDIT_TABLE regardless of the number of rows updated in the EMP table.

- Hide questions