SQL Interactive Practice Lab
Customers
1 - Alice
2 - Bob
3 - Charlie
Orders
1 - Laptop
1 - Mouse
2 - Phone
4 - Tablet
Build Result
Stored Function & Procedure Simulator
Drag Correct Output Here
Database Normalization Simulator (UNF → 3NF)
Initial UNF Table:
ENROLLMENT_UNF(
StudentID,
StudentName,
CourseID,
CourseName,
InstructorName,
InstructorPhone
)
Sample Data:
(101, Mayank, C1, DBMS, Dr Smith, 9991)
(101, Mayank, C2, Cyber, Dr John, 9992)
(102, Aisha, C1, DBMS, Dr Smith, 9991)
Step 1: Identify Primary Key
Drag attributes that form the correct Primary Key.
StudentID
StudentName
CourseID
CourseName
InstructorName
InstructorPhone
Drop Primary Key Here
Step 2: Convert to 1NF (Remove Repeating Groups)
Create separate rows for each course per student.
Drop attributes that stay in 1NF table
Step 3: Convert to 2NF (Remove Partial Dependency)
Which attributes depend only on CourseID? Drag them out.
Drop attributes to move into COURSE table
Step 4: Convert to 3NF (Remove Transitive Dependency)
Which attribute depends on InstructorName, not CourseID?
Drop attribute to separate
Normalization Table Builder (Type & Check)
Initial Relation (1NF):
ENROLLMENT(
StudentID,
StudentName,
CourseID,
CourseName,
InstructorName,
InstructorPhone
)
Primary Key: (StudentID, CourseID)
Convert to 3NF.
Write your resulting tables using this format:
TABLE_NAME { attribute1, attribute2, attribute3 }

Post a Comment
Please do not enter any spam links in the comments...