📤 Compartilhe este artigo com o link curto:
A poorly structured database design may seem functional at the beginning of development, but as the system grows in production and reaches millions of records, serious problems arise such as excessive data redundancy, performance loss in queries, and worst of all, update anomalies that corrupt the integrity of company information.
To avoid these disastrous scenarios, we use the formal process of Database Normalization, based on mathematical and relational rules known as Normal Forms. In this article, we will detail the first three normal forms, essential for any developer or data analyst.
Before applying formal rules, it is important to understand what we want to avoid. Unnormalized tables typically suffer from three types of anomalies:
The first rule of normalization requires that all attributes of a table contain only atomic, indivisible values, eliminating repeating groups or columns that store comma‑separated lists within a single field.
Practical violation example: An orders table with a column called telefones_contato storing "19999998888, 19388881111" violates 1NF.
Solution (1NF): Create a related child table for phone numbers, where each number occupies an individual row linked by a foreign key.
To be in Second Normal Form, the table must meet two criteria:
If a column depends only on one of the fields that make up a composite primary key, it suffers from partial dependency and must be moved to a separate table.
Third Normal Form is the gold standard for most transactional (OLTP) relational systems. To achieve it, the table must:
Imagine a funcionarios (employees) table with columns: id_funcionario (PK), nome, id_departamento, and nome_departamento.
Here a transitive dependency occurs: nome_departamento depends on id_departamento, not directly on the employee. If the department name changes, we would have to update hundreds of rows in the employees table.
Solution (3NF): Split into two clean tables:
Rigorously applying normalization up to Third Normal Form ensures a clean, scalable data model free of dangerous redundancies and prepared to run high‑performance, absolutely consistent relational queries.