First Normal Form
A relation is in 1NF when every value is atomic and there are no repeating groups. It is the entry requirement for the relational model itself, not merely the first optional step.
- Definition
- Violation 1 — a multivalued attribute
- Wrong fix: repeating columns
- Correct fix: a separate relation
- Violation 2 — a composite value
- How atomic is atomic?
- Converting to 1NF — the method
- Worked conversion
- What 1NF does not fix
- Common mistakes
- Exam and interview questions
- Practice
- Conclusion
-
DBMS Fundamentals
- Data, Information and Databases
- What a DBMS Is and Why It Exists
- File System versus DBMS
- Advantages and Limitations of a DBMS
- Database Users and the Role of the DBA
- Three Level Architecture and Data Abstraction
- Logical and Physical Data Independence
- Schema, Instance and Metadata
- Database Applications and the Database System Environment
- Database Architecture
- Data Models
-
ER Model
- Entities, Entity Sets and Entity Types
- Types of Attributes in the ER Model
- Keys in the ER Model
- Relationships, Relationship Sets and Degree
- Cardinality and Participation Constraints
- Strong and Weak Entities
- Drawing and Reading ER Diagrams
- Extended ER: Generalisation, Specialisation and Aggregation
- Converting an ER Diagram into Relational Tables
- ER Design Projects
- Relational Model
- Relational Algebra
- Functional Dependencies
-
Normalisation
- Why Normalisation Exists: Anomalies and Redundancy
- First Normal Form
- Second Normal Form and Partial Dependency
- Third Normal Form and Transitive Dependency
- BCNF and BCNF Decomposition
- 4NF, 5NF, Multivalued and Join Dependencies
- Lossless Decomposition and Dependency Preservation
- Complete Worked Normalisation: Unnormalised to BCNF
- Denormalisation and When to Use It
Definition
A relation is in first normal form when:
- Every attribute value is atomic — it cannot be meaningfully divided.
- There are no repeating groups — no attribute holds several values.
- Every tuple is unique, so a primary key exists.
- Every value of an attribute comes from the same domain.
1NF is not really optional. The relational model defines a relation as having atomic values, so a structure that fails 1NF is not a relation at all. That is why it is the first form.
Violation 1 — a multivalued attribute
NOT IN 1NF
roll | name | phone
-----+--------+---------------------------
21 | Meera | 9840012345, 9840099887
22 | Ravi | 9840055512
23 | Anitha | 9840077123, 9840088234, 9840012000
Problems this creates:
"find the student with number 9840099887"
needs string searching, and matches 98400998876 too
"how many numbers does Meera have"
needs counting commas
a number cannot be validated, indexed or constrained
adding a number means rewriting the whole stringWrong fix: repeating columns
STILL NOT IN 1NF
roll | name | phone1 | phone2 | phone3
-----+-------+------------+------------+-----------
21 | Meera | 9840012345 | 9840099887 | (null)
22 | Ravi | 9840055512 | (null) | (null)
This is a REPEATING GROUP wearing different clothes.
the fourth number has nowhere to go
most cells are null
searching all numbers means checking three columns
the column NUMBER carries meaning, which it must notCorrect fix: a separate relation
IN 1NF
STUDENT STUDENT_PHONE
roll | name roll | phone
-----+------- -----+-----------
21 | Meera 21 | 9840012345
22 | Ravi 21 | 9840099887
23 | Anitha 22 | 9840055512
23 | 9840077123
23 | 9840088234
23 | 9840012000
primary key ( roll, phone )
Any number of phones, each searchable, each constrainable,
and no nulls wasted.Violation 2 — a composite value
NOT ATOMIC
address
---------------------------------
14 Anna Salai, Chennai, 600002
"all students in Chennai" now depends on string parsing
and on everyone having typed the city in the same position.
IN 1NF
street | city | pincode
--------------+---------+--------
14 Anna Salai | Chennai | 600002How atomic is atomic?
Atomicity is judged by how the application uses the value, not by whether it could theoretically be split.
| Value | Atomic? | Because |
|---|---|---|
| A full name, when only ever displayed | Yes | Nothing queries the parts |
| A full name, when sorted by surname | No | The parts are used separately |
| A date | Yes | The DBMS provides operations on it as one value |
| A comma separated list | Never | It is a repeating group regardless of use |
The list case is the only absolute. Everything else is a design judgement, and the honest answer in an interview is "it depends on whether the parts are queried independently".
Converting to 1NF — the method
- Find every attribute holding more than one value.
- Remove it from the original relation.
- Create a new relation containing the original primary key plus that attribute.
- Make the primary key of the new relation the combination of both.
- Split composite attributes into their parts, if the parts are used separately.
Worked conversion
UNNORMALISED
order_no | customer | items
---------+----------+---------------------------------
5001 | Meera | (pen, 10, 5), (book, 2, 250)
5002 | Ravi | (bag, 1, 900)
Two problems: items repeats, and each item is composite.
IN 1NF
ORDER ORDER_ITEM
order_no | customer order_no | item | qty | price
---------+--------- ---------+------+-----+------
5001 | Meera 5001 | pen | 10 | 5
5002 | Ravi 5001 | book | 2 | 250
5002 | bag | 1 | 900
ORDER_ITEM primary key ( order_no, item )
Now every value is atomic, every value is in its own
column, and both relations have a key.What 1NF does not fix
ENROLMENT ( roll, course, name, title, marks )
key = ( roll, course )
This IS in 1NF - every value is atomic.
But name repeats on every row for that student, and
title repeats on every row for that course.
1NF removed repeating groups. It did nothing about
partial dependency, which is what 2NF exists for.Common mistakes
- Using numbered columns to fix a multivalued attribute. That is still a repeating group.
- Believing 1NF means one table. It usually means more tables.
- Thinking any splittable value breaks 1NF. A date is atomic; a comma separated list is not.
- Storing a delimited list because it is convenient. Every operation on it becomes string handling.
- Forgetting the new relation needs a composite key. Both the original key and the value.
Exam and interview questions
- Define 1NF and state all four conditions.
- Why is a comma separated list a 1NF violation, and why is a numbered set of columns also one?
- Convert a table with a multivalued attribute into 1NF and give both primary keys.
- What does atomic mean, and how do you decide in a borderline case?
- Give a relation that is in 1NF but still has redundancy.
Practice
- Convert BOOK ( isbn, title, authors, publisher ) where authors is a list.
- Decide whether each is atomic for a payroll system: full name, date of joining, list of skills, bank account number.
- Convert an invoice with repeating line items into 1NF and state both keys.
Conclusion
1NF requires atomic values and forbids repeating groups, in every disguise including numbered columns. Move the repeating attribute into its own relation keyed by the original key plus the value — and then move on, because 1NF leaves plenty of redundancy for 2NF to remove.