Which of the following best describes the main goal of the Third Normal Form (3NF) in database design?
Think about what kind of dependencies 3NF tries to remove to avoid data anomalies.
3NF requires that all non-key columns depend only on the primary key, removing transitive dependencies that can cause redundancy and update anomalies.
Consider the table below:
EmployeeID | EmployeeName | DepartmentID | DepartmentName ----------------------------------------------------- 1 | Alice | 10 | Sales 2 | Bob | 20 | Marketing 3 | Carol | 10 | Sales
Which column(s) cause a transitive dependency violating 3NF?
Look for columns that depend on other non-key columns instead of the primary key.
DepartmentName depends on DepartmentID, which is not the primary key. This is a transitive dependency violating 3NF.
You have a table:
Orders(OrderID, CustomerID, CustomerName, CustomerAddress, ProductID, ProductName, Quantity)
Which of the following decompositions correctly achieves 3NF?
3NF requires removing transitive dependencies by separating entities into their own tables.
Option D separates customers and products into their own tables, removing transitive dependencies and ensuring all non-key attributes depend only on the primary key.
Given a database normalized to 3NF with separate tables for Customers, Orders, and Products, which query approach is most efficient to get the total quantity ordered by each customer?
Think about which tables contain the necessary data and how to combine them efficiently.
JOINs between Customers and Orders allow grouping by customer to sum quantities. Products table is not needed for quantity sums but may be joined if product info is required.
Examine the following SQL table definition:
CREATE TABLE Employee ( EmployeeID INT PRIMARY KEY, EmployeeName VARCHAR(100), DepartmentID INT, DepartmentName VARCHAR(100), FOREIGN KEY (DepartmentID) REFERENCES Department(DepartmentID) );
What is the main problem violating 3NF in this design?
Check if any non-key column depends on another non-key column.
DepartmentName depends on DepartmentID, which is not the primary key of Employee table, causing a transitive dependency violating 3NF.