MySQL + SQL · Lesson 27
1NF, 2NF and 3NF with Examples
What is 1NF, 2NF and 3NF with Examples?
1NF, 2NF and 3NF with Examples: 1NF, 2NF and 3NF are the first three normal forms used to improve table design. 1NF removes repeating groups, 2NF removes partial dependency and 3NF removes transitive dependency.
This topic is written for Class 12, BCA, B.Tech and beginner-to-advanced database learners. The focus is not only on definitions, but also on practical understanding with MySQL commands, output and common mistakes.
Why is it Important?
These normal forms are frequently asked in Class 12, BCA, B.Tech exams and DBMS interviews because they show whether a database design is clean or not.
Class 12 Use
Short notes, differences, practical file queries, output-based questions and viva answers.
Short notes, differences, practical file queries, output-based questions and viva answers.
B.Tech / BCA Use
Database design, DBMS theory, SQL labs, backend development and project implementation.
Database design, DBMS theory, SQL labs, backend development and project implementation.
Real Project Use
School ERP, fee software, result analysis, library records, ecommerce orders and admin dashboards.
School ERP, fee software, result analysis, library records, ecommerce orders and admin dashboards.
Interview Use
Common in SQL, DBMS, backend developer and data analyst interviews.
Common in SQL, DBMS, backend developer and data analyst interviews.
Important Terms
Before learning the command or concept, understand these words because they are repeatedly used in SQL and DBMS questions.
relationtupleattributedomainkeyconstraintdependencynormal form1nf2nf3nf
Syntax / SQL Pattern
-- 3NF style structure
CREATE TABLE departments (dept_id INT PRIMARY KEY, dept_name VARCHAR(50));
CREATE TABLE students (roll_no INT PRIMARY KEY, name VARCHAR(80), dept_id INT,
FOREIGN KEY (dept_id) REFERENCES departments(dept_id));
Department name depends on dept_id, not directly repeated in student rows.
Step-by-Step Explanation
- Remove repeating groups and multi-valued fields.
- Keep each fact in one proper place.
- Use keys to connect tables after splitting.
- Check dependencies before finalizing table design.
- Read the query from top to bottom and identify the table names, columns and conditions.
- When the query changes data, always think about safety, constraints and backup.
Class 12 Notes
- Write a clear one-line definition of 1NF, 2NF and 3NF with Examples.
- Add one simple example using student, marks, fee or library table.
- For SQL output questions, first identify selected columns, condition and order.
- Use correct terms such as table, row, column, key, constraint, query and result set.
B.Tech Level Notes
At B.Tech level, connect 1NF, 2NF and 3NF with Examples with schema design, constraints, normalization, query processing, indexing, transaction safety and application development. Explain the reason behind each command, not only its syntax.
Common Mistakes
- Memorizing the command without understanding where it is used.
- Running UPDATE or DELETE without checking the WHERE condition.
- Ignoring primary key, foreign key and NULL rules while designing tables.
- Testing only on one or two rows instead of using realistic sample data.
- Mixing up SQL standard concepts with MySQL-specific syntax.
Practice Tasks
- Create a small school database and apply this topic practically.
- Write at least three queries related to 1NF, 2NF and 3NF with Examples.
- Predict the output before running the query.
- Write one viva question and answer in your notebook.
- Try to modify the example for a library, hospital or shopping database.
Quick Revision
Summary: This lesson is an important part of MySQL/SQL learning. Learn the definition, understand the use, practice the example and then connect it with real database projects.