Maila
Maila
SUBMITTED BY :
GROUP1 (GIRLS)
MAILA TAHIR
21324/411724
The words normalization and normal form refer to the structure of a database.
Normalization was developed by IBM researcher E.F. Codd in the 1970s.
Normalization increases clarity in organizing data in Databases
Normalization is used to minimize the redundancy from a relation or set of
relations. It is also used to eliminate undesirable characteristics like Insertion,
Update, and Deletion Anomalies.
Normalization divides the larger table into smaller and links them using
relationships.
Need of normalization ?
The main reason for normalizing the relations is removing these anomalies.
Failure to eliminate anomalies leads to data redundancy and can cause data
integrity and other problems as the database grows.
Normalization consists of a series of guidelines that helps to guide you in
creating a good database structure.
Normal forms : (first 3 )
Normalization consist of series, steps or stages called Normal Forms
It is a state of relation that can be determined by applying simple rules or conditions .
If relation satisfy the condition of normal forms then the relation is said to be in that
normal form
STAGES ACTIONS
. UN-NORMALIZED RELATION
A single cell must not hold more than one value (atomicity)
There must be a primary key for identification
No duplicated rows or columns Each column must have only one value for each row
in the table.
Suppose Above Relation is named as PATIENT and Primary key of this Relation is Selected
as Combination od PatientID and VisitDate attribues
PATIENT(PatientID,Name,Address,VisitDate,Physician,Diagnosis,Treatment)
Partial Dependency must be removed to convert a Relation inti 2nd Normal Form.
Therefore we Split the Relation into Following 2 Relations as PATIENT2 and
PATIENT HISTORY.
PATIENT2(PatientID,Name,Address)
PATIENT HISTORY(PatientID,VisitDate,Physician,Diagnosis,Treatment)
In the Relation PATIENT2 ,Primary key id PatientID and all other attributes are Functionally
Dependent on this primary key. Similarly ,in the Relation PATIENT HISTORY, Primary key
is PatientID and VisitDate and all other attributes are Functionally Dependent on this primary
key. Therefore these Relations are in 2NF
PAT-HISTORY(PatientID,VisitDate,Physician,Diagnosis)
Diagnosis Treatment
Chest Infection Free
Cold Free
Hepatitis-A Paid
Cough Free
Flu Free
If we see PATIENT HISTORY , it was in 2NF . Obvious that physician and Diagnosis
Attributes are directly dependent on the primary key but the treatment is indirectly dependent
on primary key .
Therefore, we Split the Relation into 2 Relation to get the relation in 3NF Suppose these
Relations to be named as PAT-HISTORY and DIAGNOSIS ..