MySQL 19 - 1NF


0   0

First normal form (1NF) is the first layer of database normalization. The focus of 1NF is atomicity (singularity). Every column needs to hold only one attribute and only one value for that attribute. This means that columns should not be plural. Additionally, one entity can take up only one row and one row can describe at max one entity.

In our example, we had a column called social_networks. This implies that multiple values can be inserted per row. To fix this, we can make it singular. The downside to this is that you are limited to just one value for that column. If you wanted to have two or more social networks you have to add a table with a foreign key that references the user_id. This allows multiple social networks because multiple rows in the network table can reference a single user.

Finally, we need to make sure that each attribute actually describes the entity. Every column needs to describe the key.


Support me!

Subscribe to my newsletter:


~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~

More content:

Amazing Web Hosting - (The best web hosting for a cheap price!)
View More