FOR FREE YEAR SOLVED

1NF

A domain is atomic if elements of the domain are considered to be indivisible units.

 

1NF: A relation R is in 1NF if the domains of all attributes of are atomic i.e. no attribute contains multi-value.

1, 2, 3, 4, 5 – atomic domain.

(1, 2), 4, (3, 8) – not atomic domain.

So, multi-valued attributes are not allowed at 1NF because multi-valued attributes are not atomic.

 

The above table is not in 1NF because it has multi-valued attributes like ‘Cname

 

Convert it to 1NF

Method 1:

But we do not prefer the method because we add one extra column schema change it is not a good practice.

 

Method 2:

But here Sid is not the primary key, now SidSname is the primary key. But these methods create redundancy.

So, we do not consider this method.

 

Method 3:

Actually, Cname creates the problem of multi-valued that is why we break Sid Sname and Sid Cname primary key of R1 is Sid and primary key of R2 is Sid Cname. Here redundancy somehow reduces compare to the previous one.

So, method 3 is the best method which is in 1NF.

 

#  Process to convert in 1NF: Which attribute creates a problem (because of multi-valued) separate it into a table with the primary key of the main table. And keep the rest of the attribute with the primary key in another table.

 

# Compound or composite attribute also not allowed at 1NF

A relation is in 1NF if it meets the definition of relation.

1. Each attribute (Column) value must be a single value.

 

2. All values for a given attribute (column) must be the same type.

 

3. Each attribute name must be unique.

 

4. Composite attribute not allowed.

 

5. The order of attributes (columns) is insignificant.

 

6. The orders of tuples (row) in a relationship can identical (primary key must).

 

7. The order of the tuples (row) is insignificant.