First Normal Form in SQL

Advertisements

SQL Naming Conversion SQL Command

First Normal Form in DataBase

First Normal Form (1NF) is a property of a relation in a relational database. A relation is in first normal form if and only if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute contains only a single value from that domain.

first normal form

1st Normal Form

In this normal form user need to remove the multi-value attribute on the table. For a table to be in the First Normal Form, it should follow the following 4 rules:

  • It should only have single(atomic) valued attributes/columns
  • Values stored in a column should be of the same domain
  • All the columns in a table should have unique names
  • And the order in which data is stored, does not matter

There are no duplicate rows and each row should have a unique identifier (or Primary key). A table should be free from repeating groups.

The values in each column of a table are atomic. Meaning a field value cannot be decomposed into smaller pieces or should not be divided into parts with more than one kind of data in it.
Like: A Person's Name column could be further divided into First, Middle, Last Name columns.

Example: Relation Department is not in 1NF because of multi-valued attribute Subject.

Roll_noNameSUBJECT
100FaizJAVA
101RamaC++, JAVA
102HiteshANDROID
103SultanC,C++
106MahendraPHP

The decomposition of the Department table into 1NF has been shown below:

Roll_noNameSUBJECT
100FaizJAVA
101RamaC++, JAVA
101RamaJAVA
102HiteshANDROID
103SultanC,C++
103SultanC++
106MahendraPHP

SQL Naming Conversion SQL Command

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects