Data Normalization

From the patients and diseases example you were able to extract the data in any order and create almost any kind of report from that data. In order to create a database that can be accessed effectively, the database must be normalized. A normalized database that can produce all of the reports that you need.

There are a few simple rules to normalization:

  1. NO repeating groups: If we added a field to patients for each disease we would have violated this rule.
  2. NO duplication of data. If we had put the patient name in the disease table, we would have violated this rule.
  3. NO data that does not depend on the primary key, created a separate table instead. If we put information on the disease in the disease table we would have violated this rule because the key to this table is the patient id and the disease.
  4. NO data that can be computed easily. If we had added the patients age, we would have violated this rule.
  5. Every field in a table must need the full key.

Read any or all of the following to design a good database.

Normalization rules

Normalization intro

Example

Intro to Normalization


INDEX, Introduction, Addresses, No repeating groups
Next lesson: Create a MySQL TableMAIN INDEX
EXAMPLES INDEX

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

Introduction