Oracle Database Quiz Questions

Course Name:Oracle
Chapter Name:Chapter 8 - RDBMS Concepts
Lesson Content Link:Database Index
Current Quiz Count:30
Progress
0%
Q1
True / False

In ORACLE, an index can improve the performance of SELECT queries.

Q2
True / False

In ORACLE, an index is automatically created on the Primary Key of a table.

Q3
True / False

In ORACLE, creating an index on a column automatically enforces uniqueness.

Q4
True / False

In ORACLE, composite indexes can be created on multiple columns.

Q5
True / False

In ORACLE, bitmap indexes are efficient for columns with low cardinality.

Q6
True / False

In ORACLE, indexes are automatically used in every query that references the indexed columns.

Q7
True / False

In ORACLE, an index can become fragmented and require rebuilding to maintain performance.

Q8
True / False

In ORACLE, the use of indexes always results in faster query performance.

Q9
True / False

In ORACLE, function-based indexes can be created to index expressions or functions.

Q10
True / False

In ORACLE, a reverse key index reverses the bytes of each column indexed to improve performance in certain scenarios.

Q11
Multiple Choice

Which SQL code snippet demonstrates creating a basic index on a single column in Oracle?

SQL Code
CREATE INDEX idx_employee_name
ON employees (last_name);
Q12
Multiple Choice

Which SQL code snippet demonstrates creating a unique index on multiple columns in Oracle?

SQL Code
CREATE UNIQUE INDEX idx_unique_employee
ON employees (first_name, last_name);
Q13
Multiple Choice

Which SQL code snippet demonstrates using an index in a SELECT query for faster retrieval?

SQL Code
SELECT employee_id, last_name
FROM employees
WHERE last_name = 'Smith';
Q14
Multiple Choice

Which SQL code snippet demonstrates creating a bitmap index in Oracle?

SQL Code
CREATE BITMAP INDEX idx_emp_dept
ON employees (department_id);
Q15
Multiple Choice

Which SQL code snippet demonstrates dropping an index in Oracle?

SQL Code
DROP INDEX idx_employee_name;
Q16
Multiple Choice

Which SQL code snippet demonstrates creating a function-based index in Oracle?

SQL Code
CREATE INDEX idx_upper_last_name
ON employees (UPPER(last_name));
Q17
Multiple Choice

Which SQL code snippet demonstrates creating a reverse key index in Oracle?

SQL Code
CREATE INDEX idx_rev_emp_id
ON employees (employee_id) REVERSE;
Q18
Multiple Choice

Which SQL code snippet demonstrates certification-level use of indexing strategies for query optimization in Oracle?

SQL Code
SELECT /*+ INDEX(emp idx_employee_name) */ employee_id, last_name
FROM employees emp
WHERE last_name = 'Smith';
Q19
Multiple Choice

Which SQL code snippet demonstrates certification-level indexing of a large table with partitioning?

SQL Code
CREATE INDEX idx_partition_emp
ON employees (department_id)
LOCAL (PARTITION BY HASH (department_id));
Q20
Multiple Choice

Which SQL code snippet demonstrates certification-level creation of a composite index in Oracle?

SQL Code
CREATE INDEX idx_emp_composite
ON employees (last_name, first_name, department_id);
Q21
Single Choice

Which index type would you use in Oracle to optimize the following query?

SQL Code
SELECT employee_id, last_name, salary
FROM employees
WHERE salary > 50000
ORDER BY last_name ASC;
Q22
Single Choice

How would you create an index to improve the performance of a query filtering by both department_id and hire_date?

SQL Code
SELECT employee_id, department_id, hire_date
FROM employees
WHERE department_id = 10
AND hire_date > '01-JAN-2020';
Q23
Single Choice

Which index would you create to improve the following query where a function is applied to the column in the WHERE clause?

SQL Code
SELECT product_id, product_name
FROM products
WHERE UPPER(product_name) = 'LAPTOP';
Q24
Single Choice

What type of index would you create to optimize queries filtering by multiple columns including one with a high number of distinct values?

SQL Code
SELECT order_id, customer_id
FROM orders
WHERE customer_id = 102
AND order_date > '01-JUL-2022';
Q25
Single Choice

How would you create an index to optimize a query that performs a case-insensitive search on the email column?

SQL Code
SELECT user_id, email
FROM users
WHERE LOWER(email) = 'john.doe@example.com';
Q26
Single Choice

What is the best index type for optimizing queries that involve frequently updated columns?

SQL Code
SELECT product_id, stock
FROM inventory
WHERE stock < 100
AND product_category = 'Electronics';
Q27
Single Choice

Which index type would you create to improve the performance of a query that joins two tables on non-primary key columns?

SQL Code
SELECT o.order_id, c.customer_name
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id
WHERE o.order_date > '01-JAN-2023';
Q28
Single Choice

How would you create an index on a large table to speed up full table scans on a specific column?

SQL Code
SELECT employee_id, department_id
FROM employees
WHERE department_id = 20;
Q29
Single Choice

What type of index should you create to improve the query performance on a column that has a significant number of null values?

SQL Code
SELECT product_id, discount
FROM products
WHERE discount IS NOT NULL;
Q30
Single Choice

Which type of index would you use for optimizing queries that include wildcards in the WHERE clause?

SQL Code
SELECT product_id, product_name
FROM products
WHERE product_name LIKE '%Phone%';