Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Functional dependency
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Applications to normalization == === Heath's theorem === An important property (yielding an immediate application) of functional dependencies is that if ''R'' is a relation with columns named from some set of attributes ''U'' and ''R'' satisfies some functional dependency ''X'' β ''Y'' then <math>R=\Pi_{XY}(R)\bowtie\Pi_{XZ}(R)</math> where ''Z'' = ''U'' β ''XY''. Intuitively, if a functional dependency ''X'' β ''Y'' holds in ''R'', then the relation can be safely split in two relations alongside the column ''X'' (which is a key for <math>\Pi_{XY}(R)\bowtie\Pi_{XZ}(R)</math>) ensuring that when the two parts are joined back no data is lost, i.e. a functional dependency provides a simple way to construct a [[lossless join decomposition]] of ''R'' in two smaller relations. This fact is sometimes called ''Heaths theorem''; it is one of the early results in database theory.<ref>{{Cite book | last1 = Heath | first1 = I. J. | chapter = Unacceptable file operations in a relational data base | doi = 10.1145/1734714.1734717 | title = Proceedings of the 1971 ACM SIGFIDET (now SIGMOD) Workshop on Data Description, Access and Control - SIGFIDET '71 | pages = 19β33 | year = 1971 | s2cid = 22069259 }} cited in: * {{cite book|editor=Michael Anshel and William Gewirtz|title=Mathematics of Information Processing: [short Course Held in Louisville, Kentucky, January 23-24, 1984]|chapter-url=https://archive.org/details/mathematicsofinf0034unse/page/23|year=1986|publisher=American Mathematical Soc.|isbn=978-0-8218-0086-7|author=Ronald Fagin and Moshe Y. Vardi|chapter=The Theory of Data Dependencies - A Survey|page=[https://archive.org/details/mathematicsofinf0034unse/page/23 23]}} *{{cite book|author=C. Date|title=Database in Depth: Relational Theory for Practitioners|url=https://books.google.com/books?id=TR8f5dtnC9IC&pg=PT162|year=2005|publisher=O'Reilly Media, Inc.|isbn=978-0-596-10012-4|page=142}} </ref> Heath's theorem effectively says we can pull out the values of ''Y'' from the big relation ''R'' and store them into one, <math>\Pi_{XY}(R)</math>, which has no value repetitions in the row for ''X'' and is effectively a [[lookup table]] for ''Y'' keyed by ''X'' and consequently has only one place to update the ''Y'' corresponding to each ''X'' unlike the "big" relation ''R'' where there are potentially many copies of each ''X'', each one with its copy of ''Y'' which need to be kept synchronized on updates. (This elimination of redundancy is an advantage in [[OLTP]] contexts, where many changes are expected, but not so much in [[OLAP]] contexts, which involve mostly queries.) Heath's decomposition leaves only ''X'' to act as a [[foreign key]] in the remainder of the big table <math>\Pi_{XZ}(R)</math>. Functional dependencies however should not be confused with [[inclusion dependency|inclusion dependencies]], which are the formalism for foreign keys; even though they are used for normalization, functional dependencies express constraints over one relation (schema), whereas inclusion dependencies express constraints between relation schemas in a [[database schema]]. Furthermore, the two notions do not even intersect in the [[classification of dependencies]]: functional dependencies are [[equality-generating dependency|equality-generating dependencies]] whereas inclusion dependencies are [[tuple-generating dependency|tuple-generating dependencies]]. Enforcing referential constraints after relation schema decomposition (normalization) requires a new formalism, i.e. inclusion dependencies. In the decomposition resulting from Heath's theorem, there is nothing preventing the insertion of tuples in <math>\Pi_{XZ}(R)</math> having some value of ''X'' not found in <math>\Pi_{XY}(R)</math>. === Normal forms === Normal forms are [[database normalization]] levels which determine the "goodness" of a table. Generally, the [[third normal form]] is considered to be a "good" standard for a relational database.{{citation needed|date=December 2012}} Normalization aims to free the database from update, insertion and deletion anomalies. It also ensures that when a new value is introduced into the relation, it has minimal effect on the database, and thus minimal effect on the applications using the database.{{citation needed|date=December 2012}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)