Junior — Middle
Explain the principles of data normalization in relational databases.
sobes.tech AI
Answer from AI
Normalization of data in relational databases is the process of organizing data to reduce redundancy and ensure integrity. The main principles are:
- First Normal Form (1NF): all fields contain atomic (indivisible) values, with no repeating groups.
- Second Normal Form (2NF): the table is in 1NF, and all non-key attributes fully depend on the entire composite key (if the key is composite).
- Third Normal Form (3NF): the table is in 2NF, and there are no transitive dependencies between non-key attributes.
The goal of normalization is to avoid data duplication, facilitate updates, and maintain the database. For example, instead of storing the client's address in each order record, the address is separated into a dedicated clients table, linked by a key.
This increases efficiency and reduces the likelihood of errors when data is modified.