Normalization
The process of decomposing large and complex table into the simple and normal table is called normalization. It is a process to present the database in a normal form to avoid undesirable things such as repetition of information, inability of represents information, loss of information etc. it improves performance of database by reducing data redundancy in large extent.
Concept of normalization
Data normaliz ation is the process to present database in a normal form to avoid undesirable things such as repetition of information, inability to represent information, loss of informatin etc. it improves performance by reducing data redundancy to a large extent.
EF C odd has introduced few rules for normalizing the database in 1970 and these rules are known as normal forms. This process minimizes and controls the duplication of data in a database and also provides a rapid search for data from database.
Basic rule for normalization
- The attribute values in a relational table should be functionally dependent on.
- The primary key value.
- No repeating groups allowed in relational tables.
- A relational table should not have attributes involved in a with the primary key
Normalization is used to avoid
Duplication of data
Insert anomaly: A record about an entity cannot be inserted into the table without first inse of information about another entity, we cannot enter a customer with a sales order.
Delete anomaly: A record cannot be deleted without deleting a record about a related entity. Eg: we cannot delete a sales order without deleting all of the customers' information.
Update anomaly: cannot update information without changing information in many places. Eg: to update a customer information, it must be updated for each sales order the customer has placed.
Unnormalized database:
Normalized database:
Advantages of normalization
- It reduces data redundancy (duplication of data)
- It improves faster sorting and indexing.
- It simplifies the structure of the database table.
- It improves the performance of a system.
- It avoids loss of information.
Normal Forms
1 NF ( First Normal form)
- Each table cell should contain a single value.
- Each record needs to be unique
- Be in 1NF
- Single Column Primary Key that does not functionally dependent on any subset of candidate key relation
- Eliminated partial key dependencies.
- Functional dependency: the value of one attribute in a table is determined entirely by value of another
- Parital dependency: A type of functional dependency where an attribute is functional dependent on only part of the primary key
3NF (Third Normal Form)
- Rule 1-Be in 2NF
- Rule 2-Has no transitive functional dependencies
- Transitive dependencies: A transitive dependencies is one in which, among three attributes, A, B, and C, if A→B, B→C, then C→A.
Author Spotlight
Santosh ChapagainGmail: chapagainsantoshcs@gmail.com
Phone no: +977-9863512955
1 Comments
Hello
ReplyDelete