HomeMySQL An Introduction to Database Normalization
An Introduction to Database Normalization
A database can be great fun, right? Yes, of course!There are though, a couple things that can ruin allthat hard work and effort you put into your efficient little database. Today we discuss how to keep that beloved bin of data from going bad on you: databasenormalization.
Call me a nerd, but I’ll never forget the elation I felt several years back when I first succeeded in connecting a database to a Web page. At the time a newcomer to the world of database administration, I happily began creating all kinds of databases to store my valuable information. However, several problems soon arose, due in large part to the techniques that I had employed when designing the tables that were employed to store my data. The tables were becoming increasingly difficult to maintain, with some of the data even getting unwittingly deleted or modified! Thoroughly disgusted with the thought of losing control of my data, I set out to learn more about the mechanics of efficient database administration, concentrating upon a particularly important aspect named database normalization.
Database normalization can essentially be defined as the practice of optimizing table structures. Optimization is accomplished as a result of a thorough investigation of the various pieces of data that will be stored within the database, in particular concentrating upon how this data is interrelated. An analysis of this data and its corresponding relationships is advantageous because it can result both in a substantial improvement in the speed in which the tables are queried, and in decreasing the chance that the database integrity could be compromised due to tedious maintenance procedures.
Before delving further into the subject of db normalization, allow me to introduce a few terms that frequently arise when discussing this subject. To better illustrate the meaning of the respective terms, I’ll allude to a hypothetical database which contains information about a school scheduling system.