MySQL Database Quiz Questions

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

MySQL, normalization involves organizing data to minimize redundancy.

Q2
True / False

MySQL, the first normal form (1NF) requires that all columns in a table have unique values.

Q3
True / False

MySQL, a table is in the second normal form (2NF) if it is already in the first normal form (1NF) and has no partial dependencies

Q4
True / False

MySQL, the third normal form (3NF) is achieved when a table is in second normal form (2NF) and there are no transitive dependencies.

Q5
True / False

MySQL, denormalization is the process of applying normalization principles to a database design.

Q6
True / False

MySQL, normalization to the Boyce-Codd Normal Form (BCNF) can sometimes require decomposing tables into smaller tables.

Q7
True / False

MySQL, a table in fourth normal form (4NF) must also be in Boyce-Codd Normal Form (BCNF).

Q8
True / False

MySQL, a table in fifth normal form (5NF) eliminates all join dependencies and is also known as project-join normal form (PJNF).

Q9
True / False

MySQL, tables in domain-key normal form (DKNF) can have redundancy if domain constraints are not enforced.

Q10
True / False

MySQL, achieving sixth normal form (6NF) is essential for all database designs to ensure minimal redundancy and maximum data integrity.

Q11
Single Choice

Which of the following best describes normalization in MySQL?

Q12
Single Choice

What is the primary purpose of the first normal form (1NF) in MySQL?

Q13
Single Choice

Which of the following is a benefit of normalizing a MySQL database?

Q14
Single Choice

In MySQL, which normal form deals with transitive dependencies?

Q15
Single Choice

What is the key requirement for a table to be in the second normal form (2NF) in MySQL?

Q16
Single Choice

Which of the following statements is true about Boyce-Codd Normal Form (BCNF) in MySQL?

Q17
Single Choice

What is a potential drawback of over-normalizing a MySQL database?

Q18
Single Choice

In MySQL, what does the term "de-normalization" refer to?

Q19
Single Choice

In MySQL, if a table is in BCNF, which of the following must be true?

Q20
Single Choice

Which of the following best explains why a MySQL database designer might choose to use denormalization?

Q21
Multiple Choice

Which SQL statement demonstrates normalization by splitting a table into two to eliminate redundancy?

SQL Code
CREATE TABLE customers (
 customer_id INT PRIMARY KEY,
 name VARCHAR(100)
);
CREATE TABLE orders (
 order_id INT PRIMARY KEY,
 customer_id INT,
 order_date DATE,
 FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
);
Q22
Multiple Choice

Which SQL code illustrates the concept of first normal form (1NF) in a table design?

SQL Code
CREATE TABLE employees (
 employee_id INT PRIMARY KEY,
 first_name VARCHAR(50),
 last_name VARCHAR(50),
 address VARCHAR(255)
);
Q23
Multiple Choice

Which SQL statement correctly moves a database design from first normal form (1NF) to second normal form (2NF)?

SQL Code
CREATE TABLE departments (
 department_id INT PRIMARY KEY,
 department_name VARCHAR(100)
);
CREATE TABLE employees (
 employee_id INT PRIMARY KEY,
 first_name VARCHAR(50),
 last_name VARCHAR(50),
 department_id INT,
 FOREIGN KEY (department_id) REFERENCES departments(department_id)
);
Q24
Multiple Choice

Which SQL code snippet is an example of achieving third normal form (3NF) in a table design?

SQL Code
CREATE TABLE products (
 product_id INT PRIMARY KEY,
 product_name VARCHAR(100),
 category_id INT,
 FOREIGN KEY (category_id) REFERENCES categories(category_id)
);
CREATE TABLE categories (
 category_id INT PRIMARY KEY,
 category_name VARCHAR(100)
);
Q25
Multiple Choice

Select the SQL code that demonstrates normalization by breaking down a table to eliminate redundancy and ensure referential integrity.

SQL Code
CREATE TABLE customers (
 customer_id INT PRIMARY KEY,
 customer_name VARCHAR(100)
);
CREATE TABLE orders (
 order_id INT PRIMARY KEY,
 customer_id INT,
 order_date DATE,
 FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
);
Q26
Multiple Choice

Which SQL statement best demonstrates the transition from second normal form (2NF) to third normal form (3NF) by eliminating transitive dependencies?

SQL Code
CREATE TABLE employees (
 employee_id INT PRIMARY KEY,
 employee_name VARCHAR(100),
 department_id INT,
 salary DECIMAL(10, 2),
 FOREIGN KEY (department_id) REFERENCES departments(department_id)
);
CREATE TABLE departments (
 department_id INT PRIMARY KEY,
 department_name VARCHAR(100)
);
Q27
Multiple Choice

Which SQL code effectively demonstrates the normalization process by removing partial dependencies in a relational table?

SQL Code
CREATE TABLE projects (
 project_id INT PRIMARY KEY,
 project_name VARCHAR(100),
 manager_id INT,
 FOREIGN KEY (manager_id) REFERENCES managers(manager_id)
);
CREATE TABLE managers (
 manager_id INT PRIMARY KEY,
 manager_name VARCHAR(100)
);
Q28
Multiple Choice

Which SQL code demonstrates how normalization helps in eliminating data anomalies by organizing data into related tables?

SQL Code
CREATE TABLE students (
 student_id INT PRIMARY KEY,
 student_name VARCHAR(100)
);
CREATE TABLE enrollments (
 enrollment_id INT PRIMARY KEY,
 student_id INT,
 course_id INT,
 FOREIGN KEY (student_id) REFERENCES students(student_id)
);
Q29
Multiple Choice

Choose the SQL code that effectively demonstrates third normal form (3NF) by eliminating all non-key dependencies in a table design.

SQL Code
CREATE TABLE employees (
 employee_id INT PRIMARY KEY,
 employee_name VARCHAR(100),
 department_id INT,
 salary DECIMAL(10, 2),
 FOREIGN KEY (department_id) REFERENCES departments(department_id)
);
CREATE TABLE departments (
 department_id INT PRIMARY KEY,
 department_name VARCHAR(100)
);
Q30
Multiple Choice

Which SQL code snippet best illustrates the normalization process to achieve higher normal forms by removing transitive dependencies?

SQL Code
CREATE TABLE students (
 student_id INT PRIMARY KEY,
 student_name VARCHAR(100)
);
CREATE TABLE courses (
 course_id INT PRIMARY KEY,
 course_name VARCHAR(100)
);
CREATE TABLE enrollments (
 enrollment_id INT PRIMARY KEY,
 student_id INT,
 course_id INT,
 FOREIGN KEY (student_id) REFERENCES students(student_id),
 FOREIGN KEY (course_id) REFERENCES courses(course_id)
);