Oracle Database Quiz Questions

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

In Oracle, a table must be in First Normal Form (1NF) before it can be considered in Second Normal Form (2NF).

Q2
True / False

In Oracle, a table is in Second Normal Form (2NF) if it does not have any partial dependencies.

Q3
True / False

In Oracle, a table with a single-column primary key is automatically in Second Normal Form (2NF) if it is already in First Normal Form (1NF).

Q4
True / False

In Oracle, a table with a composite primary key is in Second Normal Form (2NF) if all non-key columns are fully dependent on the entire primary key.

Q5
True / False

In Oracle, to achieve Second Normal Form (2NF), it may be necessary to decompose a table into multiple tables.

Q6
True / False

In Oracle, normalization to Second Normal Form (2NF) can help reduce data redundancy.

Q7
True / False

In Oracle, a table that is in Second Normal Form (2NF) can still have transitive dependencies.

Q8
True / False

In Oracle, a table that includes a foreign key must also ensure that all non-key attributes are fully dependent on the entire primary key to be in Second Normal Form (2NF).

Q9
True / False

In Oracle, converting a table to Second Normal Form (2NF) can involve creating additional tables and establishing foreign key relationships between them.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on the principles of normalization, including Second Normal Form (2NF), and how to apply these principles to design efficient database schemas.

Q11
Multiple Choice

Which of the following SQL tables adheres to the Second Normal Form (2NF) in Microsoft SQL Server?

SQL Code
Consider the following table definition:
CREATE TABLE Employees (
 EmployeeID INT,
 EmployeeName VARCHAR(100),
 DepartmentID INT,
 DepartmentName VARCHAR(100)
);
Which of these options ensure the table meets 2NF?
Q12
Multiple Choice

Which modification would violate Second Normal Form (2NF) in the following table?

SQL Code
CREATE TABLE Orders (
 OrderID INT,
 ProductID INT,
 OrderDate DATE,
 ProductName VARCHAR(100),
 PRIMARY KEY (OrderID, ProductID)
);
Q13
Multiple Choice

Which SQL table design does not adhere to Second Normal Form (2NF)?

SQL Code
CREATE TABLE Enrollment (
 StudentID INT,
 CourseID INT,
 EnrollmentDate DATE,
 StudentName VARCHAR(100),
 CourseName VARCHAR(100)
);
Q14
Multiple Choice

Fill in the blank: To achieve Second Normal Form (2NF), which SQL operation would you perform on the following table?

SQL Code
CREATE TABLE BookOrders (
 OrderID INT,
 BookID INT,
 OrderDate DATE,
 BookTitle VARCHAR(100),
 PRIMARY KEY (OrderID, BookID)
);
Q15
Multiple Choice

Given the table below, which modification will ensure the table is in Second Normal Form (2NF)?

SQL Code
CREATE TABLE Sales (
 SaleID INT,
 SaleDate DATE,
 CustomerID INT,
 CustomerName VARCHAR(100),
 ProductID INT,
 ProductName VARCHAR(100)
);
Q16
Multiple Choice

Which SQL operation will move the following table to Second Normal Form (2NF)?

SQL Code
CREATE TABLE Invoices (
 InvoiceID INT,
 CustomerID INT,
 InvoiceDate DATE,
 CustomerName VARCHAR(100),
 CustomerAddress VARCHAR(255)
);
Q17
Multiple Choice

Which SQL query would you use to verify that a table adheres to Second Normal Form (2NF)?

SQL Code
Assume you have the following table:
CREATE TABLE Transactions (
 TransactionID INT,
 ProductID INT,
 TransactionDate DATE,
 ProductName VARCHAR(100)
);
Q18
Multiple Choice

Which SQL code snippet demonstrates a table that violates the Second Normal Form (2NF) due to partial dependency?

SQL Code
CREATE TABLE order_details (
order_id NUMBER,
product_id NUMBER,
product_name VARCHAR2(100),
quantity NUMBER,
PRIMARY KEY (order_id, product_id)
);
Q19
Multiple Choice

Which SQL code snippet demonstrates a table correctly normalized to the Second Normal Form (2NF)?

SQL Code
CREATE TABLE orders (
order_id NUMBER PRIMARY KEY,
order_date DATE
);

CREATE TABLE products (
product_id NUMBER PRIMARY KEY,
product_name VARCHAR2(100)
);

CREATE TABLE order_details (
order_id NUMBER,
product_id NUMBER,
quantity NUMBER,
PRIMARY KEY (order_id, product_id),
FOREIGN KEY (order_id) REFERENCES orders(order_id),
FOREIGN KEY (product_id) REFERENCES products(product_id)
);
Q20
Multiple Choice

Which SQL code snippet correctly identifies a partial dependency that should be removed to achieve Second Normal Form (2NF)?

SQL Code
CREATE TABLE project_assignments (
project_id NUMBER,
employee_id NUMBER,
project_name VARCHAR2(100),
start_date DATE,
PRIMARY KEY (project_id, employee_id)
);
Q21
Single Choice

Which of the following statements correctly defines Second Normal Form (2NF) in Oracle databases?

Q22
Single Choice

Which of the following Oracle SQL operations might violate Second Normal Form?

Q23
Single Choice

In Oracle, which of the following is a sign that a table is not in Second Normal Form?

Q24
Single Choice

Consider the following Oracle table definition:Which normalization issue does this table have that prevents it from being in Second Normal Form?

SQL Code
CREATE TABLE orders (
 order_id NUMBER,
 customer_id NUMBER,
 order_date DATE,
 customer_name VARCHAR2(50),
 PRIMARY KEY (order_id, customer_id)
);
Q25
Single Choice

How can you modify the following Oracle table to ensure it complies with Second Normal Form?

SQL Code
CREATE TABLE student_courses (
 student_id NUMBER,
 course_id NUMBER,
 course_name VARCHAR2(50),
 PRIMARY KEY (student_id, course_id)
);
Q26
Single Choice

Given the following Oracle SQL table creation script, identify which column violates Second Normal Form:

SQL Code
CREATE TABLE project_assignments (
 employee_id NUMBER,
 project_id NUMBER,
 project_name VARCHAR2(100),
 assignment_date DATE,
 PRIMARY KEY (employee_id, project_id)
);
Q27
Single Choice

Which SQL operation would be used to normalize the following Oracle table to Second Normal Form?

SQL Code
CREATE TABLE employee_projects (
 emp_id NUMBER,
 proj_id NUMBER,
 proj_desc VARCHAR2(255),
 emp_role VARCHAR2(50),
 PRIMARY KEY (emp_id, proj_id)
);
Q28
Single Choice

Examine the following Oracle table structure:To achieve Second Normal Form, which of the following should be done?

SQL Code
CREATE TABLE sales_data (
 sales_id NUMBER,
 product_id NUMBER,
 sales_amount NUMBER,
 product_name VARCHAR2(100),
 PRIMARY KEY (sales_id, product_id)
);
Q29
Single Choice

In Oracle, a composite key consisting of emp_id and dept_id is used in a table. If dept_name is an attribute in the same table, what would be the result regarding Second Normal Form?

Q30
Single Choice

Consider the Oracle table below:What is the best way to normalize this table to Second Normal Form?

SQL Code
CREATE TABLE employee_data (
 emp_id NUMBER,
 dept_id NUMBER,
 dept_location VARCHAR2(100),
 emp_name VARCHAR2(100),
 PRIMARY KEY (emp_id, dept_id)
);