0
0
SQLquery~5 mins

Second Normal Form (2NF) in SQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Second Normal Form (2NF) in database design?
2NF means a table is in First Normal Form (1NF) and all non-key columns depend on the whole primary key, not just part of it.
Click to reveal answer
beginner
Why do we use Second Normal Form (2NF)?
To remove partial dependencies and avoid duplicate data, making the database easier to maintain and update.
Click to reveal answer
intermediate
What is a partial dependency in the context of 2NF?
A partial dependency happens when a non-key column depends on only part of a composite primary key, not the whole key.
Click to reveal answer
intermediate
Given a table with a composite key (StudentID, CourseID) and a column 'StudentName', why is this a problem for 2NF?
'StudentName' depends only on 'StudentID', part of the key, causing a partial dependency. This violates 2NF.
Click to reveal answer
intermediate
How do you fix a table that violates 2NF?
Split the table into two: one with the full key and dependent columns, and another with the partial key and its dependent columns.
Click to reveal answer
What must a table already satisfy before it can be in Second Normal Form (2NF)?
AIt must be in First Normal Form (1NF)
BIt must have no null values
CIt must have only one column
DIt must have no foreign keys
What does 2NF primarily aim to eliminate?
APartial dependencies
BTransitive dependencies
CDuplicate rows
DNull values
If a table has a single-column primary key, is it automatically in 2NF?
ANo, it must be in 3NF first
BNo, it must have multiple keys
CYes, but only if it has no nulls
DYes, because no partial dependency is possible
Which of these is an example of a partial dependency?
AA column depends on the entire primary key
BA column depends on only part of a composite key
CA column depends on a non-key column
DA column has null values
How can you fix a partial dependency in a table?
ARemove the primary key
BAdd more columns to the table
CSplit the table into two tables to separate dependencies
DAdd null values to dependent columns
Explain Second Normal Form (2NF) and why it is important in database design.
Think about how columns relate to the whole primary key.
You got /3 concepts.
    Describe how you would identify and fix a partial dependency in a table with a composite primary key.
    Focus on which columns depend on which parts of the key.
    You got /3 concepts.