Database Normalization

By: Gail Seymour

Database normalization is a process of database design which eliminates duplicate or redundant data in a relational database. It also removes inconsistent dependencies by ensuring that data is stored in tables in a logical and organized manner. This is achieved for practical purposes through three levels of normalization, referred to as the first, second and third normal forms, or NF1, NF2, and NF3.

A database confirms to the first normal form if there are no repeating elements or groups of elements within each row, or tuple, of data. So for example, in a database tracking customer invoices, a nonconforming database might have each row in a single table listing the order ID, customer name and address details and columns for first item, quantity and description, repeated for second, and third items and so on. The problem is what happens when a customer places a large order. Either the invoice has to be split into two rows, or the database restructured with additional columns to accommodate this. In order to eliminate these repeating columns, the data might be split into two tables, one containing the order ID and customer information, the other the individual order items.

Where data in a relational database is split into two or more tables, it is connected for ease of retrieval and manipulation through primary and foreign keys. This isn't as complicated as it sounds. Each row in the table must be unique. To ensure there are no duplicates, each table is assigned a primary key, or a column in which duplicates are not allowed. This can be an automatically assigned numerical key, or a user entered one, such as OrderID. It can even be made up of a combination of two columns, such as OrderID and ItemID, in which case it is known as a concatenated primary key. A foreign key is simply a column in one table which references the primary key of another table, so in this instance it might be the reference to CustomerID within the orders table, which connects the order to the customer.

The rule of second normal form says that where a concatenated primary key exists, each column within the table must rely on both parts of the key. If some data relies only on one part of the key, it should be moved to its own table and connected to the original table by the use of a foreign key. So for example rather than retaining a single table with both order and ordered items details, these would be split into two separate tables, one organized by a primary key OrderID and containing item and quantity details, the other organized by the primary key ItemID containing description and price details. The two are then linked to through ItemID column.

To be NF3 compliant, any fields that do not depend on the key must be removed. Thus in an orders table which contains both order date and customer details, with the primary key OrderID, the customer details are not dependent on the primary key. These should instead be removed to a customer's table, with the primary key CustomerID, with only the CustomerID column remaining in the orders table as a foreign key reference.

Related Life123 Articles
Do you know, what is a database used for? Databases are important for storing and organizing information for both individuals and businesses.
Database software gives you the ability to store and retrieve information. Although typically used by businesses, everything from recipes to tax records can benefit from free database software.
Frequently Asked Questions on Ask.com
More Related Life123 Articles
To create a simple database, you need to determine an organizational structure before you start inputting data.
What is a database good for? You may not realize it, but much of what you do on your computer or online involves a database.
Advantages of relational databases include the ability to create more sophisticated queries and generate comprehensive reports.
These database basics for beginners can help you choose a good database program and set up your data.
Top database management software packages and their strengths and weaknesses.
This definition of a database can help you understand how a database is different from an ordinary spreadsheet.
Developing databases requires database management software. Database software and a database management system involve various types of databases, including free database software.
Understanding database meaning is crucial for anyone who must work with large amounts of information all at once.
The advantages of using a database are enormous, as organizing your information can save you both time and money.
A database management system establishes a connection to the data in the database.
Adding new fields in existing Access databases is relatively easy, as long as you don't mind going back and filling in the extra information.

Computer skills in the workplace are crucial for a large proportion of modern roles. When applying for a job, nearly all office workers should be able to confidently say th...click here for more.

Wondering "what is database software?" It is is an application designed to store, organize and manage information.
This database software definition helps to explain how databases can help both businesses and everyday consumers.
A database is an electronic file that stores information in a series of records. Records are often contained in one or more tables.
Relational databases include multiple tables but also allow for links that connect the tables in a logical manner.
Answers Partner Sites: Ask Answers  |  Kids Answers  |  Ask How-To  |  Reference Answers  |  Life123 Answers  |  GardenandHearth Answers
Partner Sites: Insider Pages  |  MerchantCircle  |  Urbanspoon  |  Ask Kids  |  Thesaurus
© 2012 Life123, Inc. All rights reserved. An IAC Company