Database Reference
In-Depth Information
If A S B, the values of A may or may not be unique in
a relation. However, every time a given value of A appears,
it will be paired with the same value of B. A determinant is
unique in a relation only if it determines every other attri-
bute of the relation. You cannot always rely on determining
functional dependencies from sample data. The best idea is
to verify your conclusions with the users of the data.
A key is a combination of one or more columns used
to identify one or more rows. A composite key is a key with
two or more attributes. A determinant that determines ev-
ery other attribute is called a candidate key. A relation may
have more than one candidate key. One of them is selected
to be used by the DBMS for finding rows and is called the
primary key. A surrogate key is an artificial attribute used
as a primary key. The value of a surrogate key is supplied by
the DBMS and has no meaning to the user. A foreign key is a
key in one table that references the primary key of a second
table. A referential integrity constraint is a limitation on data
values of a foreign key that ensures that every value of the
foreign key has a match to a value of a primary key.
The three kinds of modification anomalies are insert, up-
date, and delete. Codd and others defined normal forms for
describing different table structures that lead to anomalies.
A table that meets the conditions listed in Figure  3-4 is in
1NF. Some anomalies arise from functional dependencies.
Three forms, 2NF, 3NF, and BCNF, are used to treat such
anomalies.
In this text, we are only concerned with the best of these
forms, BCNF. If a relation is in BCNF, then no anomalies from
functional dependencies can occur. A relation is in BCNF if
every determinant is a candidate key.
Relations can be normalized using either a “Step-by-
Step” method or a “Straight-to-BCNF” method. Which
method to use is a matter of personal preference, and both
methods produce the same results.
Some anomalies arise from multivalued dependen-
cies. A multidetermines B, or A S S B, if A determines
a set of values. If A multidetermines B, then any relation
that contains A, B, and one or more other columns will
have modification anomalies. Anomalies due to multi-
valued dependencies can be eliminated by placing the
multivalued dependency in a table of its own. Such tables
are in 4NF.
There is a 5NF, but generally tables in 4NF are in 5NF.
DK/NF has been defined, but in practical terms the defini-
tion of DK/NF is the same as the definition of BCNF.
Key Terms
attribute
Boyce-Codd Normal Form (BCNF)
candidate key
composite determinant
composite key
data integrity problems
database integrity
deletion anomaly
determinant
domain
domain integrity constraint
domain/key normal form (DK/NF)
entity
entity integrity constraint
fifth normal form (5NF)
first normal form (1NF)
foreign key
fourth normal form (4NF)
functional dependency
functionally dependent
insertion anomaly
key
multivalued dependency
non-prime attribute
normal forms
null value
overlapping candidate key
partially dependent
primary key
Project-Join Normal Form (PJ/NF)
referential integrity constraint
relation
second normal form (2NF)
surrogate key
third normal form (3NF)
transitive dependency
tuple
update anomaly
 
 
Search WWH ::




Custom Search