Home About us Development Training Support |
Normalize a databaseThe goal of normalization is to remove these dangerous features from the database:
Normalization starts as a mechanical process where you just follow the rules but the final design will need to be adjusted by an intelligent hand. StagesThere are six stages to Normalization but the first three - 1st, 2nd, and 3rd Normal Form - are adequate for most situations. The other stages - Boyce-Codd, 4th and 5th - are more relevant to academic study.
Result of normalizationYou start the process with all your information in a single flat table and normalization gives you a number of smaller tables that hold the same information but which hold it in an efficient and unambiguous way. The process so far has been mechanical - in fact Access has a Wizard to do it for you - but the next three steps need some intelligence. One-to-one relationsNormalization will never generate two tables in a one-to-one relationship. There is no theoretical reason to separate fields like this but you might want to split a table into two for practical reasons such as:
Many-to-many relationsA many-to-many relationship cannot be implemented directly and has to be represented by an intermediate table that shows the many links between the two tables. Sometimes this intermediate table will just hold these two foreign keys, for example the student ID and the course code. Sometimes more information will be held, for example the mark that this student achieved on this course. Normalization will tell you that Students and Courses should be separated from the original Enrolments table but normalization will not tell you how best to implement the link between these tables. DenormalizationNormalized tables store data efficiently as safely without duplication but you may need to denormalize for the following reasons:
Remember that the theory of normalization was developed in a time when a megabyte of disk storage space cost over £100. Prices now are less than a tenth of a penny a megabyte and there is no longer the pressure for extreme efficiency. Developer time is more expensive than storage space. As an extreme example, you could normalize an address table into county, town, district, street, house name, and house number tables. This would save disk space but a simple address list would require an awkward and inefficient six-table query. This normalization is correct in theory but impractical. |
Hints & tips
The textbox class in Visual FoxPro 9 has a new Autocomplete
property which shows the user the previous values that have
been entered in that textbox.
More...
|