Saturday 24 September 2011

Normalization :


Normalization is a process of efficiently organizing data by eliminating the redundancy and inconsistent dependency.

First Normal Form (1NF) :

Eliminate repeating groups in individual tables.
Create a separate table for each set of related data.
Identify each set of related data with a primary key.

Second Normal Form (2NF) :
Create separate tables for sets of values that apply to multiple records.
Relate these tables with a foreign key.

Third Normal Form (3NF) :
Eliminate fields that do not depend on the key.

Reasonable normalization frequently improves performance. When useful indexes are available, the SQL Server query optimizer is efficient at selecting rapid, efficient joins between tables.

Some of the benefits of normalization include the following:

Normalization will save disc space by eliminating redundancy.
Faster sorting and index creation.
A larger number of clustered indexes.
Narrower and more compact indexes.
Fewer indexes per table. This improves the performance of the INSERT, UPDATE, and DELETE statements.
Fewer null values and less opportunity for inconsistency. This increases database compactness.

As normalization increases, the number and complexity of joins required to retrieve data also increases. Too many complex relational joins between too many tables can hinder performance.

Tuesday 20 September 2011

Entity-Relationship Diagram :

An entity relationship diagram is a graphical representation of a relationship between the entities in a database and illustrates the logical structure of database. Entity-Relationship diagram also known as ER diagram and E-R diagram. ER diagrams commonly use three different types of symbols, Boxes commonly used to represent Entities, Diamonds used to represent Relationships and Ovals are used to represent Attributes.