04 May,2015 by Tom Collins
Question: What is the third normal form (3NF) and how does it differentiate from second normal form (2NF) and first normal form (1NF) ?
Answer: Before we start with normalization definitions let’s looks at the goals.
Normalization aims to:
1) Eliminate redundancy
2) Store data in the correct table
3) Eliminate need to restructure data when data is added
How does it achieve these goals? These definitions give you some basic guidelines.
1NF : The table is organized as an unordered set of data, and there are no repeating columns. Each record is unique identified by a primary key.
The primary key is a unique identifier of every value in the table. A correctly designed table has a key uniquely identifying each row.NULLS are not permitted in primary key columns
A point of debate is whether to use are an arbitrary id or a natural key - such as a combination of first_lastname. Careful analysis is required as the this could easily introduce the possibility of conflicts
The foreign key is the key in table 2 - which is the primary key in the Table 1
There is only one value in every cell.
This means all the columns are scalar values. Scalar values means you can’t maintain two values in one cell.
2NF: You don't repeat data in one column of your table because of another column. All non key fields depend on all components of the primary key. Read more on How to decide on the Primary Key
If a non key attribute is only related to one part of the Primary Key, then the table is not in 2NF.
3NF: Every column in the table relates only to the table's key . There are no columns that have a column in a table that describes another column in your table which isn't the key.Functional dependency
Notes on how to implement the normal form in design
1)Relationships are maintained with one to one , one to many and many to many relationships
2)3NF is OK for most database designs
3)Look out for attribute splitting. The basis of good database design is a valid data model. Even if data is spread across multiple databases or partitioned , a valid data model will unify the data across the disparate physical locations
Database designers often use Entity Relationship (ER) Diagrams to create a sort of flowchart , presenting the entities and how they relate to each other .
ER Diagrams use various symbols to represent the entity and attribute relationships.
DBA - Database Architect - Data Architect - What's the difference ...
SQL Server - ISO-11179 Naming Conventions and SQL DDL
Where to maintain data integrity rules? - Sqlserver-dba.com
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |