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-EXTRANOTES

nORMALIZATION-EXTRANOTES

Ratings: (0)|Views: 608 |Likes:

More info:

Published by: Mohamed Luffycero Ahmed on Mar 21, 2011
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

11/23/2013

pdf

text

original

 
NORMALIZATION
TUTORIAL (EXTRA)
1. Given the dependency diagram, answer items a-c:
C1 C2 C3 C4 C5
a. Identify and discuss each of the indicated dependencies.
C1
C2 represents a
partial dependency
, because C2 depends only on C1, rather than on the entire primary key composed of C1 and C3.C4
C5 represents a
transitive dependency
, because C5 depends on an attribute(C4) that is not part of a primary key.C1, C3
C2,
 
C4, C5 represents a set of proper functional dependencies, becauseC2, C4, and C5 depend on the primary key composed of C1 and C3.
b. Create a database whose tables are at least in 2NF, showing thedependency diagrams for each table.
C1 C2C1 C3 C4 C5Table 1Primary key: C1Foreign key: NoneNormal form: 3NFTable 2Primary key: C1 + C3Foreign key: C1 (to Table 1)Normal form: 2NF, because thetable exhibits the transitivedependencies C4 C5
 
c. Create a database whose tables are at least in 3NF, showing thedependency diagrams for each table.
C1 C2C1 C3 C4C4Table 1Primary key: C1Foreign key: NoneNormal form: 3NFTable 2Primary key: C1 + C3Foreign key: C1 (to Table 1)C4 (to Table 3)Normal form: 3NFTable 3Primary key: C4Foreign key: NoneNormal form: 3NFC5
Transitive dependency is a condition in which an attribute isdependent on another attribute that is not part of the primary key.This kind of dependency usually requires the decomposition of thetable containing the transitive dependency.To remove a transitive dependency, the designer must perform thefollowing actions:
Place the attributes that create the transitive dependency in a separate table.
Make sure that the new table's primary key attribute is the foreign key in theoriginal table.
Figure Q5.9 shows an example of a transitive dependency removal.
Figure Q5.9 Transitive Dependency Removal
 
INV_NUM INV_DATE INV_AMOUNT CUS_NUMCUS_ADDRESS CUS_PHONEOriginal tableTransitive DependenciesINV_NUM INV_DATE INV_AMOUNT CUS_NUMCUS_NUM CUS_ADDRESSCUS_PHONENew Tables
1.
Using the INVOICE table structure shown in Table P5.1,write the relational schema, draw its dependency diagram and identify alldependencies (including all partial and transitive dependencies). You canassume that the table does not contain repeating groups and that any invoicenumber may reference more than one product. (
Hint 
: This table uses acomposite primary key.)2. Using the initial dependency diagram drawn in Problem 1,remove all partial dependencies, draw the new dependency diagrams, andidentify the normal forms for each table structure you created.
Table P5.1 Sample INVOICE Records
Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value
INV_NUM 211347 211347 211347 211348 211349PROD_NUM AA-E3422QW QD-300932X RU-995748G AA-E3422QW GH-778345PSALE_DATE 15-Jan-2006 15-Jan-2006 15-Jan-2006 15-Jan-2006 16-Jan-2006PROD_LABEL Rotary sander 0.25-in. drillbitBand saw Rotary sander Power drillVEND_CODE 211 211 309 211 157VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, Inc.QUANT_SOLD 1 8 1 2 1

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