Java Reference
In-Depth Information
Normalization
Normalization is the process of organizing the data in a database by making it
conform to a set of rules known as the normal forms. The normal forms are a set of
design guidelines that are designed to eliminate redundancies and to ensure
consistent dependencies. Apart from wasting space, redundant data creates
maintenance problems. For example, if you save a customer's address in two
locations, you need to be absolutely certain to make any required changes in both
locations.
It is important to ensure that data dependencies are consistent so that you can
access and manipulate data in a logical and consistent manner. A glance at the
examples shown in Tables 1-2 and 1-4 through 1-6 reveals how related data items
are stored in the same table, separate from unrelated items.
Although normalization enhances the integrity of the data by minimizing redundancy
and inconsistency, it does so at the cost of some impact on performance.
Data-retrieval efficiency can be reduced, since applying the normalization rules can
result in data being redistributed across multiple records. This can be seen from the
examples shown in Tables 1-2 and 1-4 through 1-6, where information pertaining to a
single order is distributed across four separate tables.
A database that conforms to the normalization rules is said to be in normal form . If the
database conforms to the first rule, the database is said to be in first normal form,
abbreviated as 1NF . If it conforms to the first four rules, the database is considered to
be in fourth normal form (4NF) .
First normal form
The requirements of the first normal form are as follows:
 
All records have the same number of fields.
 
All fields contain only a single data item.
 
There must be no repeated fields.
The first of these requirements, that all occurrences of a record type must contain the
same number of fields, is a built-in feature of all database systems.
The second requirement, that all fields contain only one data item, ensures that you
can retrieve data items individually. This requirement is also known as the atomicity
requirement. Requiring that each data item be stored in only one field in a record is
important to ensure data integrity.
Finally, each row in the table must be identified using a unique column or set of
columns. This unique identifier is the primary key.
Search WWH ::




Custom Search