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
3Activity
0 of .
Results for:
No results containing your search query
P. 1
normalization notes

normalization notes

Ratings: (0)|Views: 78 |Likes:
Published by mingichi

More info:

Published by: mingichi on Feb 16, 2010
Copyright:Attribution Non-commercial

Availability:

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

12/08/2011

pdf

text

original

 
Normalization
Normalization is the process of efficiently organizing data in a database with twogoals in mindFirst goal: eliminate redundant data –for example, storing the same data in more than one tableSecond Goal: ensure data dependencies make sense – for example, only storing related data in a table
Benefits of Normalization
Less storage spaceQuicker updatesLess data inconsistencyClearer data relationshipsEasier to add dataFlexible Structure
Rules of Data Normalization
1NF
Eliminate Repeating Groups - Make a separate table for each set of relatedattributes, and give each table a primary key
2NF
Eliminate Redundant Data - If an attribute depends on only part of a multi-valued key, remove it to a separate table
3NF
Eliminate Columns Not Dependent On Key - If attributes do not contributeto a description of the key, remove them to a separate table
BCNF
Boyce-Codd Normal Form - If there are non-trivial dependencies betweencandidate key attributes, separate them out into distinct tables
4NF
Isolate Independent Multiple Relationships - No table may contain two or more 1:n or n:m relationships that are not directly related
5NF
Isolate Semantically Related Multiple Relationships - There may be practicalconstrains on information that justify separating logically related many-to-manyrelationships.
 
EMPLOYEES_PROJECTS_TIMEA table with fields containing too much data.
EmployeeIDNameProjectTime
 
Project Title
EN1-26Sean O'Brien30-452-T3, 30-457-T3, 32-244-T30.25, 0.40, 0.30STAR manualISO proceduresEmployee handbookEN1-33Amy Guya30-452-T3, 30-382-TC, 32-244-T30.05, 0.35, 0.60STAR manualWeb SiteNew catalogEN1-35Steven Baranco30-452-T3, 31-238-TC0.15, 0.80STAR manualSTAR prototypeEN1-36Elizabeth Roslyn35-152-TC0.90STAR pricingEN1-38Carol Schaaf36-272-TC0.75Order systemEN1-40Alexandra Wing31-238-TC, 31-241-TC0.20, 0.70STAR prototypeNew catalog
First Normal Form
 A table is in first normal form (1NF) if there are no repeating groups.
A repeating group is a set of logically related fields or values that occur multiple timesin one record.
Eliminate the repeating groups in the individual tables
Create a separate table for each set of related data.
Identify each set of related data with a primary keyA table with repeating groups of fields.
EmployeeIDLastNameFirstNameProject1Time1Project2Time2Project3Time3
EN1-26O'BrienSean30-452-T30.2530-457-T30.4032-244-T30.30EN1-33GuyaAmy30-452-T30.0530-382-TC0.3532-244-T30.60EN1-35BarancoSteven30-452-T30.1531-238-TC0.80EN1-36RoslynElizabeth35-152-TC0.90EN1-38SchaafCarol36-272-TC0.75EN1-40WingAlexandra31-238-TC0.2031-241-TC0.70
*EmployeeIDLastNameFirstName*ProjectNumberProjectTitle
EN1-26O'BrienSean30-452-T3STAR manualEN1-26O'BrienSean30-457-T3ISO proceduresEN1-26O'BrienSean31-124-T3Employee handbook
 
EN1-33GuyaAmy30-452-T3STAR manualEN1-33GuyaAmy30-482-TCWeb SiteEN1-33GuyaAmy31-241-TCNew catalogEN1-35BarancoSteven30-452-T3STAR manualEN1-35BarancoSteven31-238-TCSTAR prototypeEN1-36RoslynElizabeth35-152-TCSTAR pricingEN1-38SchaafCarol36-272-TCOrder systemEN1-40WingAlexandra31-238-TCSTAR prototypeEN1-40WingAlexandra31-241-TCNew catalog
Second Normal Form (2NF)
A relation is in 2NF if it is in 1NF and every non-key attribute is
functionally dependentupon the primary key.Take the table above and design new tables that will eliminate the repeated data in thenon-key fields.
1.
To decide what fields belong together in a table, think about which fielddetermines the values in other fields. Create a table for those fields and enter thesample data.
 
2.
Think about what the primary key for each table would be and about therelationship between the tables. If necessary, add foreign keys .
3.
Mark the primary key for each table and make sure that you don't haverepeating data in non-key fields.EMPLOYEES 
*EmployeeIDLast NameFirst Name
EN1-26O'BrienSeanEN1-33GuyaAmyEN1-35BarancoStevenEN1-36RoslynElizabethEN1-38SchaafCarolEN1-40WingAlexandra

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)//-->