Consider a table Orders with columns: OrderID, ProductID, ProductName, Quantity. The primary key is a composite key of (OrderID, ProductID).
Which column violates the Second Normal Form (2NF) by having a partial dependency?
CREATE TABLE Orders ( OrderID INT, ProductID INT, ProductName VARCHAR(100), Quantity INT, PRIMARY KEY (OrderID, ProductID) );
Think about which column depends only on part of the composite key.
ProductName depends only on ProductID, not on the full composite key (OrderID, ProductID). This is a partial dependency and violates 2NF.
Which of the following statements correctly describes the requirement for a table to be in Second Normal Form (2NF)?
2NF focuses on dependencies related to composite keys.
2NF requires that no non-key attribute depends on only part of a composite key, i.e., no partial dependency.
Given the table StudentCourses with columns StudentID, CourseID, StudentName, CourseName, and composite primary key (StudentID, CourseID), which decomposition correctly achieves 2NF?
Think about separating attributes that depend only on part of the key.
Separating StudentName and CourseName into their own tables removes partial dependencies, achieving 2NF.
Given this table definition:
CREATE TABLE Sales ( SaleID INT, ProductID INT, ProductDescription VARCHAR(255), Quantity INT, PRIMARY KEY (SaleID, ProductID) );
Which problem causes this table to violate 2NF?
Look for columns that depend on only part of the key.
ProductDescription depends only on ProductID, causing partial dependency and violating 2NF.
You have a table OrderDetails with columns OrderID, ProductID, ProductPrice, OrderDate, and composite primary key (OrderID, ProductID).
Which design change best removes partial dependencies to achieve 2NF?
Separate attributes that depend only on part of the key into their own table.
OrderDate depends only on OrderID, so splitting tables removes partial dependencies and achieves 2NF.