0% found this document useful (0 votes)
5 views

Chapter 14 Slides

This document covers the basics of functional dependencies and normalization in relational databases, outlining informal design guidelines and formal concepts. It discusses the importance of avoiding redundancy, update anomalies, and spurious tuples, while defining functional dependencies and normal forms such as 1NF, 2NF, 3NF, and BCNF. The document emphasizes the significance of schema design to ensure data integrity and efficient relational database management.

Uploaded by

ssharma.poojaa7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chapter 14 Slides

This document covers the basics of functional dependencies and normalization in relational databases, outlining informal design guidelines and formal concepts. It discusses the importance of avoiding redundancy, update anomalies, and spurious tuples, while defining functional dependencies and normal forms such as 1NF, 2NF, 3NF, and BCNF. The document emphasizes the significance of schema design to ensure data integrity and efficient relational database management.

Uploaded by

ssharma.poojaa7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Copyright © 2016 Ramez Elmasri and Shamkant B.

Navathe
CHAPTER 14

Basics of Functional Dependencies


and Normalization for Relational
Databases

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 2


Chapter Outline
n 1 Informal Design Guidelines for Relational Databases
n 1.1 Semantics of the Relation Attributes

n 1.2 Redundant Information in Tuples and Update

Anomalies
n 1.3 Null Values in Tuples

n 1.4 Spurious Tuples

n 2 Functional Dependencies (FDs)


n 2.1 Definition of Functional Dependency

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 3


Chapter Outline
n 3 Normal Forms Based on Primary Keys
n 3.1 Normalization of Relations

n 3.2 Practical Use of Normal Forms

n 3.3 Definitions of Keys and Attributes


Participating in Keys
n 3.4 First Normal Form

n 3.5 Second Normal Form

n 3.6 Third Normal Form

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 4


Chapter Outline
n 4 General Normal Form Definitions for 2NF and 3NF (For
Multiple Candidate Keys)

n 5 BCNF (Boyce-Codd Normal Form)

n 6 Multivalued Dependency and Fourth Normal Form

n 7 Join Dependencies and Fifth Normal Form

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 5


1. Informal Design Guidelines for
Relational Databases (1)

n What is relational database design?


n The grouping of attributes to form "good" relation
schemas
n Two levels of relation schemas
n The logical "user view" level
n The storage "base relation" level
n Design is concerned mainly with base relations
n What are the criteria for "good" base relations?
n Information preservation
n Minimum redundancy (see page 460).
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 6
Informal Design Guidelines for Relational
Databases (2)
n We first discuss informal guidelines for good
relational design
n Then we discuss formal concepts of functional
dependencies and normal forms
n - 1NF (First Normal Form)

n - 2NF (Second Normal Form)

n - 3NF (Third Normal Form)

n - BCNF (Boyce-Codd Normal Form)

n Additional types of dependencies, further normal


forms, relational design algorithms by synthesis are
discussed in Chapter 15 Slide 14- 7
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
1.1 Semantics of the Relational
Attributes must be clear
n GUIDELINE 1: Informally, each tuple in a relation should
represent one entity or relationship instance. (Applies to
individual relations and their attributes).
n Attributes of different entities (EMPLOYEEs,
DEPARTMENTs, PROJECTs) should not be mixed in the
same relation
n Only foreign keys should be used to refer to other entities
n Entity and relationship attributes should be kept apart as
much as possible.
n Bottom Line: Design a schema that can be explained
easily relation by relation. The semantics of attributes
should be easy to interpret.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 8


Figure 14.1 A
simplified
COMPANY
relational
database schema

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 9


Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 10
1.2 Redundant Information in Tuples and
Update Anomalies
n When information is stored redundantly
n Wastes storage

n Causes problems with update anomalies

n Insertion anomalies

n Deletion anomalies

n Modification anomalies

n Information must be updated in


multiple relations;
n Goal is to update information once.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 11


EXAMPLE OF AN UPDATE ANOMALY
n Consider the relation:
n EMP_PROJ(Emp#, Proj#, Ename, Pname,
No_hours)
[See Figure 14.4, p466, also next slide]
n Storing natural joins of relations leads to
various update anomalies.
n Update Anomaly:
n Changing the name of project number P1
from “ProductX” to “Tesla-Roadster” may
cause this update to be made for all the
employees working on project P1.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 12
EXAMPLE OF AN INSERT ANOMALY

n Consider the relation:


n EMP_PROJ(Emp#, Proj#, Ename, Pname,

No_hours)
n Insert Anomaly:
n Cannot insert a project unless an employee is

assigned to it. (Recall that SSN is not null).


n Conversely
n Cannot insert an employee unless an he/she is

assigned to a project.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 13


EXAMPLE OF A DELETE ANOMALY

n Consider the relation:


n EMP_PROJ(Emp#, Proj#, Ename, Pname,
No_hours)
n Delete Anomaly:
n When a project is deleted, it will result in deleting
all the employees who work on that project.
n Alternately, if an employee is the sole employee
on a project, deleting that employee would result in
deleting the corresponding project.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 14


Figure 14.3 Two relation schemas
suffering from update anomalies

Figure 14.3
Two relation
schemas
suffering from
update
anomalies. (a)
EMP_DEPT and
(b) EMP_PROJ.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 15


Guideline for Redundant Information in
Tuples and Update Anomalies

n GUIDELINE 2:
n Design a schema that does not suffer from the

insertion, deletion and update anomalies.


n If there are any anomalies present, then note

them so that applications can be made to take


them into account.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 16


1.3 Null Values in Tuples

n GUIDELINE 3:
n Relations should be designed such that their
tuples will have as few NULL values as
possible
n Attributes that are NULL frequently could be

placed in separate relations (with the primary


key)
n Reasons for nulls:
n Attribute not applicable or invalid

n Attribute value unknown (may exist)

n Value known to exist, but unavailable

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 17


1.4 Generation of Spurious Tuples – avoid
at any cost
n Bad designs for a relational database may result
in erroneous results for certain JOIN operations
n The "lossless join" property is used to guarantee
meaningful results for join operations

n GUIDELINE 4:
n The relations should be designed to satisfy the
lossless join condition.
n No spurious tuples should be generated by

doing a natural-join of any relations.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 18


Spurious Tuples (2)
n There are two important properties of
decompositions:
a) Non-additive or loss-lessness of the
corresponding join
b) Preservation of the functional dependencies.
n Note that:
n Property (a) is extremely important and cannot

be sacrificed.
n Property (b) is less stringent and may be

sacrificed. (See Chapter 15).


Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 19
Figure 14.4 Sample states for EMP_DEPT and EMP_PROJ

Figure 14.4
Sample states
for EMP_DEPT
and EMP_PROJ
resulting from
applying
NATURAL JOIN to
the relations in
Figure 14.2.
These may be
stored as base
relations for
performance
reasons.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 20


Figure 14-5: Poor Design

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 21


Figure 14-6: Spurious Tuples

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 22


Guideline 4

n Design relation schemas so that they can be


joined with equality conditions on attributes that
are appropriately related (primary key, foreign
key) pairs in a way that guarantees that no
spurious tuples are created.
n Avoid relations that contain matching attributes
(names) that are not (primary key, foreign key)
combinations because joining on such attributes
may produce spurious tuples.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 23


2. Functional Dependencies
n Functional dependencies (FDs)
n Are used to specify formal measures of the

"goodness" of relational designs


n And keys are used to define normal forms for

relations
n FDs are constraints that are derived from the

meaning and interrelationships of the data


attributes
n A set of attributes X functionally determines a
set of attributes Y if the value of X determines a
unique value for Y
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 24
2.1 Defining Functional Dependencies
n X g Y holds if whenever two tuples have the
same value for X, they must have the same value
for Y
n For any two tuples t1 and t2 in any relation

instance r(R): If t1[X]=t2[X], then t1[Y]=t2[Y]


n X g Y in R specifies a constraint on all relation
instances r(R)
n Written as X g Y; can be displayed graphically on
a relation schema as in Figures. (denoted by the
arrow).
n FDs are derived from the real-world constraints
on the attributes.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 25
Examples of FD constraints (1)
n Social security number determines employee
name
n SSN g ENAME

n Project number determines project name and


location
n PNUMBER g {PNAME, PLOCATION}

n Employee ssn and project number determines


the hours per week that the employee works on
the project
n {SSN, PNUMBER} g HOURS

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 26


Examples of FD constraints (2)

n An FD is a property of the attributes in the


schema R
n The constraint must hold on every relation
instance r(R)
n If K is a key of R, then K functionally
determines all attributes in R
n We can never have two distinct tuples

with t1[K]=t2[K]

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 27


Defining FDs from instances
n Note that in order to define the FDs, we need to
understand the meaning of the attributes
involved and the relationship among them.
n An FD is a property of the attributes in the
schema R
n Given the instance (population) of a relation, all
we can conclude is that an FD may exist between
certain attributes.
n What we can definitely conclude is – that
certain FDs do not exist because there are tuples
that show a violation of those dependencies.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 28
3 Normal Forms Based on Primary Keys

n 3.1 Normalization of Relations


n 3.2 Practical Use of Normal Forms
n 3.3 Definitions of Keys and Attributes
Participating in Keys
n 3.4 First Normal Form
n 3.5 Second Normal Form
n 3.6 Third Normal Form

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 31


3.1 Normalization of Relations (1)

n Normalization:
n The process of decomposing unsatisfactory "bad"
relations by breaking up their attributes into
smaller relations
n The decomposition into several relations that
satisfy various definitions of normal forms, each
one more restrictive than the previous one.
n Normal form:
n Condition using keys and FDs of a relation to
certify whether a relation schema is in a particular
normal form.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 32
Normalization of Relations (2)

n 2NF, 3NF, BCNF


n based on keys and FDs of a relation schema
n 4NF
n based on keys, multi-valued dependencies: MVDs;
n 5NF
n based on keys, join dependencies: JDs
n Additional properties may be needed to ensure a
good relational design (lossless join, dependency
preservation; see Chapter 15)

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 33


3.2 Practical Use of Normal Forms
n Normalization is carried out in practice so that the
resulting designs are of high quality and meet the
desirable properties
n The practical utility of these normal forms becomes
questionable when the constraints on which they are
based are hard to understand or to detect.
n The database designers need not normalize to the
highest possible normal form
n Usually up to 3NF and BCNF.

n 4NF rarely used in practice.

n Denormalization:
n The process of storing the join of higher normal form
relations as a base relation—which is in a lower normal
form
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 34
3.3 Definitions of Keys and Attributes
Participating in Keys (1)

n A superkey of a relation schema


R = {A1, A2, ...., An} is a set of attributes
S a-subset-of R with the property that
no two tuples t1 and t2 in any legal relation state
r of R will have t1[S] = t2[S]
n A key K is a superkey with the additional
property that removal of any attribute from K will
cause K to no longer be a superkey.
n Thus the key K is a minimal superkey of the
relation R

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 35


Definitions of Keys and Attributes
Participating in Keys (2)

n If a relation schema has more than one key, each


is called a candidate key.
n One of the candidate keys is arbitrarily designated
to be the primary key, and the others are called
secondary keys.
n A Prime attribute must be a member of some
candidate key
n A Nonprime attribute is not a prime attribute —
that is, it is not a member of any candidate key.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 36


3.4 First Normal Form

n Considered to be part of the definition of a


relation
n Disallows
n composite attributes;
n multivalued attributes;
n nested relations; attributes whose values for an
individual tuple are non-atomic.
n Most RDBMSs allow only those relations to be
defined that are in First Normal Form

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 37


Figure 14.9 Normalization into 1NF
Figure 14.9
Normalization into 1NF. (a)
A relation schema that is not
in 1NF. (b) Sample state of
relation DEPARTMENT. (c)
1NF version of the same
relation with redundancy.

See pages 478-


479 for
normalization
details.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 38
Figure 14.10 Normalizing nested relations into 1NF

EMP_PROJ(Ssn, Ename, {PROJS(Pnumber, Hours)})

Figure 14.10
Normalizing nested relations into 1NF.
(a) Schema of the EMP_PROJ relation
with a nested relation attribute PROJS.

(b) Sample extension of the EMP_PROJ


relation showing nested relations
within each tuple.

(c) Decomposition of EMP_PROJ into


relations EMP_PROJ1 and EMP_PROJ2
by propagating the primary key.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 39


3.5 Second Normal Form (1)
n Uses the concepts of FDs, primary key
n Definitions
n Prime attribute: An attribute that is member of the primary
key K
n Full functional dependency: a FD Y -> Z where removal
of any attribute from Y means the FD does not hold any
more
n Examples:
n {SSN, PNUMBER} -> HOURS is a full FD since neither SSN
-> HOURS nor PNUMBER -> HOURS hold
n {SSN, PNUMBER} -> ENAME is not a full FD (it is called a
partial dependency ) since SSN -> ENAME also holds

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 40


Second Normal Form (2)

n A relation schema R is in second normal form


(2NF) if every non-prime attribute A in R is fully
functionally dependent on the primary key

n R can be decomposed into 2NF relations via the


process of 2NF normalization or “second normal
form normalization”.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 41


Figure 14.3 Two relation schemas
suffering from update anomalies

Figure 14.3
Two relation
schemas
suffering from
update
anomalies. (a)
EMP_DEPT and
(b) EMP_PROJ.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 42


Figure 14.11 Normalizing into 2NF and 3NF

Figure 14.11
Normalizing into 2NF and 3NF.
(a) Normalizing EMP_PROJ into
2NF relations. (b) Normalizing
EMP_DEPT into 3NF relations.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 43


3.6 Third Normal Form (1)
n Definition:
n Transitive functional dependency: a FD X -> Z
that can be derived from two FDs X -> Y and Y -> Z
n Examples:
n SSN -> DMGRSSN is a transitive FD
n Since SSN -> DNUMBER and DNUMBER ->
DMGR_SSN hold
n SSN -> ENAME is non-transitive
n Since there is no set of attributes X where SSN -> X
and X -> ENAME

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 44


Third Normal Form (2)
n A relation schema R is in third normal form (3NF) if it is
in 2NF and no non-prime attribute A in R is transitively
dependent on the primary key
n R can be decomposed into 3NF relations via the process
of 3NF normalization
n NOTE:
n In X -> Y and Y -> Z, with X as the primary key, we consider
this a problem only if Y is not a candidate key.
n When Y is a candidate key, there is no problem with the
transitive dependency .
n E.g., Consider EMP (SSN, Emp#, Salary ).
n Here, SSN -> Emp# -> Salary and Emp# is a candidate key.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 45


Figure 14.11 Normalizing into 2NF and 3NF
Some Non-prime
attributes depend
on a subset of the
key
Figure 14.11
Normalizing into 2NF and 3NF.
(a) Normalizing EMP_PROJ into
2NF relations. (b) Normalizing
EMP_DEPT into 3NF relations.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 46


Normal Forms Defined Informally

n 1st normal form


n All attributes depend on the key
n 2nd normal form
n All attributes depend on the whole (entire) key
n 3rd normal form
n All attributes depend on nothing but the key

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 47


4. General Normal Form Definitions (For
Multiple Keys) (1)

n The above definitions consider the primary key only


n The following more general definitions take into
account relations with multiple candidate keys
n Any attribute involved in a candidate key is a prime
attribute
n All other attributes are called non-prime attributes.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 48


4.1 General Definition of 2NF (For
Multiple Candidate Keys)

n A relation schema R is in second normal form


(2NF) if every non-prime attribute A in R is fully
functionally dependent on every key of R
n In Figure 14.12 the FD
County_name → Tax_rate violates 2NF.
See next Slide.

So second normalization converts LOTS into


LOTS1 (Property_id#, County_name, Lot#, Area, Price)
LOTS2 ( County_name, Tax_rate)
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 49
Figure 14.12 Normalization into 2NF and 3NF

Figure 14.12
Normalization into 2NF
and 3NF. (a) The LOTS
relation with its
functional dependencies
FD1 through FD4.
(b) Decomposing into
the 2NF relations LOTS1
and LOTS2. (c)
Decomposing LOTS1
into the 3NF relations
LOTS1A and LOTS1B.
(d) Progressive
normalization of LOTS
into a 3NF design.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 50


4.2 General Definition of Third Normal Form

n Definition:
n Superkey of relation schema R - a set of attributes
S of R that contains a key of R
n A relation schema R is in third normal form (3NF)
if whenever a FD X → A holds in R, then either:
n (a) X is a superkey of R, or
n (b) A is a prime attribute of R
n LOTS1 relation violates 3NF because
Area → Price; and Area is not a superkey in
LOTS1. (see Figure 14.12).

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 51


Figure 14.12 Normalization into 2NF and 3NF

Figure 14.12
Normalization into 2NF
and 3NF. (a) The LOTS
relation with its
functional dependencies
FD1 through FD4.
(b) Decomposing into
the 2NF relations LOTS1
and LOTS2. (c)
Decomposing LOTS1
into the 3NF relations
LOTS1A and LOTS1B.
(d) Progressive
normalization of LOTS
into a 3NF design.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 52


4.3 Interpreting the General Definition of
Third Normal Form
n Consider the 2 conditions in the Definition of 3NF:
A relation schema R is in third normal form (3NF) if
whenever a FD X → A holds in R, then either:
n (a) X is a superkey of R, or
n (b) A is a prime attribute of R
n Condition (a) catches two types of violations :
- One, where a prime attribute functionally determines a
non-prime attribute. This catches 2NF violations due to
non-full functional dependencies.
-Second, where a non-prime attribute functionally
determines a non-prime attribute. This catches 3NF
violations due to a transitive dependency.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 53
4.3 Interpreting the General Definition of
Third Normal Form (2)
n ALTERNATIVE DEFINITION of 3NF: We can restate the definition
as:
A relation schema R is in third normal form (3NF) if
every non-prime attribute in R meets both of these
conditions:
n It is fully functionally dependent on every key of R

n It is non-transitively dependent on every key of R

Note that stated this way, a relation in 3NF also meets


the requirements for 2NF.
n The condition (b) from the last slide takes care of the
dependencies that “slip through” (are allowable to) 3NF
but are “caught by” BCNF which we discuss next.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 54


5. BCNF (Boyce-Codd Normal Form)
n A relation schema R is in Boyce-Codd Normal Form
(BCNF) if whenever an FD X → A holds in R, then X is a
superkey of R
n Each normal form is strictly stronger than the previous
one
n Every 2NF relation is in 1NF
n Every 3NF relation is in 2NF
n Every BCNF relation is in 3NF
n There exist relations that are in 3NF but not in BCNF
n Hence BCNF is considered a stronger form of 3NF
n The goal is to have each relation in BCNF (or 3NF)

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 55


Figure 14.13 Boyce-Codd normal form

Figure 14.13
Boyce-Codd normal form. (a) BCNF normalization of
LOTS1A with the functional dependency FD2 being lost in
the decomposition. (b) A schematic relation with FDs; it is
in 3NF, but not in BCNF due to the f.d. C → B.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 56


Figure 14.14 A relation TEACH that is in
3NF but not in BCNF

Figure 14.14
A relation TEACH that is in 3NF
but not BCNF.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 57


Achieving the BCNF by Decomposition (1)
n Two FDs exist in the relation TEACH:
n fd1: { student, course} -> instructor
n fd2: instructor -> course
n {student, course} is a candidate key for this relation and
that the dependencies shown follow the pattern in Figure
14.13 (b).
n So this relation is in 3NF but not in BCNF
n A relation NOT in BCNF should be decomposed so as to
meet this property, while possibly forgoing the
preservation of all functional dependencies in the
decomposed relations.
n (See Algorithm 15.3)

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 58


Achieving the BCNF by Decomposition (2)
n Three possible decompositions for relation TEACH
n D1: {student, instructor} and {student, course}

n D2: {course, instructor } and {course, student}

n D3: {instructor, course } and {instructor, student} ü


n All three decompositions will lose fd1.
n We have to settle for sacrificing the functional dependency
preservation. But we cannot sacrifice the non-additivity property
after decomposition.
n Out of the above three, only the 3rd decomposition will not generate
spurious tuples after join (and hence has the non-additivity property).

n A test to determine whether a binary decomposition (decomposition


into two relations) is non-additive (lossless) is discussed under
Property NJB on the next slide. We then show how the third
decomposition above meets the property.

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 59


Chapter Summary

n Informal Design Guidelines for Relational


Databases
n Functional Dependencies (FDs)
n Normal Forms (1NF, 2NF, 3NF) Based on
Primary Keys
n General Normal Form Definitions of 2NF and 3NF
(For Multiple Keys)
n BCNF (Boyce-Codd Normal Form)
n Fourth and Fifth Normal Forms (not covered)

Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 14- 68

You might also like