Oracle Database Quiz Questions

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

In Oracle, cardinality refers to the uniqueness of data values in a column.

Q2
True / False

High cardinality indicates that a column has a large number of duplicate values.

Q3
True / False

In Oracle, cardinality is an important factor in query optimization.

Q4
True / False

Oracle uses statistics to estimate the cardinality of columns in a table.

Q5
True / False

The DBMS_STATS package in Oracle is used to collect statistics, including cardinality, for the optimizer.

Q6
True / False

In Oracle, low cardinality columns are often good candidates for bitmap indexes.

Q7
True / False

In Oracle, the estimated cardinality can be viewed in the execution plan of a query.

Q8
True / False

In Oracle, histograms can be used to improve cardinality estimates for columns with skewed data distributions.

Q9
True / False

In Oracle, a full table scan always has higher cardinality than an indexed access path.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on understanding and interpreting cardinality, its impact on query optimization, and how to gather accurate statistics using Oracle tools.

Q11
Single Choice

What does "cardinality" refer to in the context of Oracle databases?

Q12
Single Choice

Which of the following statements is true about high cardinality in Oracle?

Q13
Single Choice

In Oracle, which type of cardinality would a column like "Employee ID" typically have?

Q14
Single Choice

Consider the following Oracle SQL query:What does the query demonstrate in terms of cardinality?

SQL Code
SELECT department_id, COUNT(*)
FROM employees
GROUP BY department_id;
Q15
Single Choice

Which of the following could be an indicator of low cardinality in an Oracle table?

Q16
Single Choice

Given the Oracle SQL query:What is this query demonstrating?

SQL Code
SELECT job_id
FROM employees
GROUP BY job_id
HAVING COUNT(*) > 50;
Q17
Single Choice

What impact does cardinality have on Oracle query optimization?

Q18
Single Choice

Consider this Oracle SQL query:If the sale_date column has low cardinality, what might Oracle do to optimize this query?

SQL Code
SELECT product_id
FROM sales
WHERE sale_date = '2024-08-21';
Q19
Single Choice

In Oracle, how might you increase the cardinality of a column in a table?

Q20
Single Choice

Consider the following Oracle SQL query scenario:If department_id has low cardinality, how might this affect query performance?

SQL Code
SELECT department_id, AVG(salary)
FROM employees
GROUP BY department_id;
Q21
Multiple Choice

Identify the correct SQL statements that define cardinality in a one-to-many relationship between tables in Oracle.

SQL Code
CREATE TABLE departments (
 department_id NUMBER PRIMARY KEY,
 department_name VARCHAR2(100)
);
CREATE TABLE employees (
 employee_id NUMBER PRIMARY KEY,
 department_id NUMBER,
 CONSTRAINT fk_dept_emp FOREIGN KEY (department_id) REFERENCES departments(department_id)
);
Q22
Multiple Choice

Select the correct SQL statements to enforce cardinality in a many-to-many relationship using a junction table in Oracle.

Q23
Multiple Choice

Determine the SQL statements that will correctly define cardinality in a one-to-one relationship between two tables.

Q24
Multiple Choice

Which of the following SQL statements will correctly define the cardinality?

Q25
Multiple Choice

Choose the SQL statements that ensure correct cardinality when joining three related tables in Oracle.

Q26
Multiple Choice

Which SQL statements will enforce correct cardinality when inserting data into a junction table in Oracle?

Q27
Multiple Choice

Determine the SQL statements that correctly handle cardinality when performing a complex query involving multiple joins in Oracle.

Q28
Multiple Choice

Identify the SQL statements that correctly define cardinality constraints when creating a new table in Oracle.

Q29
Multiple Choice

Select the SQL statements that define cardinality in a self-referencing table scenario in Oracle.

Q30
Multiple Choice

Choose the SQL statements that enforce cardinality when creating indexes on foreign keys in Oracle.