Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Database Normalization Tips

Database Normalization Tips

Ratings: (0)|Views: 0 |Likes:
Published by Steven Hendry
Normalisation
Normalisation

More info:

Published by: Steven Hendry on Jul 02, 2014
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/02/2014

pdf

text

original

 
Database Normalization Tips
Luke ChungFMS,
President 
 September 2002Applies to: Microsoft® Access
Summary:
 This article offers tips to e!elopers to help them a!oi some of the pitfalls "hen esigning Access tables# This article applies to Microsoft Access atabases $#mb% an Microsoft Access pro&ects $#ap%#
Contents
Introduction
ne of the most important steps in esigning a atabase is ensuring that the ata is properl istribute among its tables# +ith proper ata structures, the remainer of the application $the 5ueries, forms, reports, coe, an so on% is significantl simplifie# The formal name for proper table esign is
database normalization
# This article is an o!er!ie" of the basic atabase normali4ation concepts an some common pitfalls to consier an a!oi#
Understanding Your Data
 
9efore proceeing "ith table esign, it;s important to unerstan "hat ou;re planning to o "ith our ata an ho" it "ill change o!er time# The assumptions ou make "ill affect the e!entual esign#
What Data Do You Need?
+hen esigning an application, it;s critical to unerstan the final results to ensure that ou ha!e all the necessar ata an kno" "here it comes from# For instance, "hat is the appearance of the reports, "here oes each piece of ata come from, an oes all the ata e7ist- othing is more amaging to a pro&ect than the reali4ation, late in the process, that ata is missing for an important report#nce ou kno" "hat ata ou nee, ou must etermine "here it comes from# 's the ata importe from another source- *oes that ata nee to be cleane or !erifie- *oes the user enter ata-/a!ing a firm grasp of "hat ata is re5uire an "here it comes from is the first step in atabase esign#
What re You !oing to Do "ith the Data?
+ill our users nee to eit the ata an, if so, ho" shoul the ata be isplae for them to unerstan an eit- Are there !aliation rules an relate lookup tables- Are there auiting issues associate "ith ata entr that re5uire keeping backups of eits an eletions- +hat kin of summar information nees to be isplae to the user- *o ou nee to generate e7port files- +ith this information, ou can en!ision ho" the fiels are relate to each other#
#o" Is Your Data $elated to %ach &ther?
.roup our ata into relate fiels $such as customer<relate information, in!oice<relate information, an so on%# 1ach group of fiels represents future tables# )ou shoul then consier ho" the are relate to each other# For instance, "hat tables are relate in a one<to<man relationship $for e7ample, one customer ma ha!e multiple in!oices%- +hat tables ha!e a one<to<one relationship $often a consieration to combine into one table%-
What Is !oing to #appen to the Data &'er Time?
After the tables are esigne, the impact of time is often not consiere an can cause huge problems later# Man table esigns "ork perfectl "ell for immeiate use# /o"e!er, man esigns break o"n as users moif the ata, as ne" ata gets ae, an as time passes# ften, e!elopers fin the nee to restructure their tables to accommoate these changes# +hen table structures change, all their epenencies $5ueries, forms, reports, coe, an so on% also nee to be upate# 9 unerstaning an anticipating change o!er time, a better esign can be implemente to minimi4e the problems#
(earn #o" to Use )ueries
 
(nerstaning ho" ou are going to anal4e an manipulate the ata is also important# )ou shoul ha!e a firm grasp of ho" 5ueries "ork, ho" to use them to link ata across multiple tables, ho" to use them to group an summari4e ata, an ho" to use crosstab 5ueries "hen ou nee to ispla ata in non<normali4e format# (ltimatel, the goal of goo ata esign is to balance the nees of storing the ata efficientl o!er time, !ersus easil retrie!ing an anal4ing it# (nerstaning the po"er of 5ueries significantl helps "ith properl esigning our tables#
Database Normalization Concepts
ather than presenting a theoretical iscussion about atabase normali4ation, this section e7plains basic concepts in!ol!e in atabase normali4ation# /o" ou appl them in our situation ma iffer base on the nees of our application# The goal is to unerstan these basic concepts, appl them "hen ou can, an unerstan the issues "hen ou nee to e!iate from them#
Store Uni*ue In+ormation in &ne ,lace
Most atabase e!elopers unerstan the basic concept of ata normali4ation# 'eall, ou; like to store the same ata in one place an refer to it "ith an '* "hen ou nee to reference it# Therefore, if some information changes, ou can change it in one place an the information changes throughout our application# For instance, a customer table "oul store a recor for each customer, incluing name, aress, phone numbers, e<mail aress, an other characteristics# The customer table "oul ha!e a uni5ue Customer'* fiel $usuall an
utonumber
 fiel% that is its ke fiel an use b other tables to refer to the customer# Therefore, an in!oice table, rather than storing all the customer information "ith each in!oice $because the same customer ma ha!e multiple in!oices%, "oul simpl refer to the customer '* !alue, "hich coul be use to look up the customer etails in the customer table# Access makes it !er eas to o this through its po"erful forms that use combo bo7es an subforms# 'f ou nee to make a change to the customer;s information $such as a ne" phone number%, ou can change it in the customer table an kno" that an other part of our application that references that information is automaticall upate#+ith a properl normali4e atabase, changes to ata o!er time are easil hanle "ith a simple eit# 'mproperl normali4e atabases often inclue programming or 5ueries to make changes across multiple recors or tables# This not onl re5uires more "ork to implement, but it also increases the chances of the ata becoming inconsistent if the coe or 5ueries on;t e7ecute properl#
$ecords are -ree. Ne" -ields are %/pensi'e

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->