|
|
| Line 1: |
Line 1: |
| {{about|a concept in LORA database theory|functional dependencies in the Haskell programming language|type class}}
| | If you've gained a limited pounds in recent years, you are wondering, "How do I lose fat?" And, you probably desire to do thus promptly plus conveniently. It's additionally a prevalent (and normally correct) perception which if you need to lose fat, we do thus gradually plus carefully in purchase to be healthy about it. There is a method to lose weight, though, where you are able to do it fast plus be healthy regarding it -- plus have it be permanent too.<br><br>The Grapefruit Diet. The grapefruit diet is one of the greatest diets to lose weight fast. People participating inside this diet lose a typical of 10 pounds inside lower than 2 weeks. The grapefruit diet is low inside calories plus low in fat. During this diet, grapefruit is consumed at every meal with a small serving of vegetables and lean protein. The grapefruit diet is awesome for fast fat loss, however should only be selected short-term to lose a limited amount of weight, such as 10 to 15 pounds.<br><br>Trick the body. A mistake folks often create is trying to learn how to lose weight only by dieting. This is tough, because as the calories lessen, a body will try and keep itself secure inside case the calories dry up altogether in the future - plus it does this by turning the fat storage up to maximum - creating more food than ever be turned into fat. Counteract this by exercising first, which will receive the body into the mode of burning fat, not storing it.<br><br>To see rapid weight loss simply begin minimize the size of your food plus eat more frequently. And you are able to accomplish this by breaking your daily food into 4 smaller meals plus two snacks.<br><br>Have 2 slices of wheat bread with some soy cheese spread on them. Prepare a fruit salad that contains pineapple chunks, kiwi fruit, papaya, passion fruit with some [http://safedietplansforwomen.com/how-to-lose-weight-fast how to lose weight fast] topping of muesli. Grill this mixture for five minutes. This breakfast must contribute about 288 calories.<br><br>Every mother which chooses to breastfeeds frequently wonders if the baby is getting enough to eat and if all is going effectively. Since you can not keep track of how countless ounces the baby is taking in, it is very usually a question on a unique mom's notice. Some are even told that they require to eat a great deal of additional food while nursing to keep up with all the milk supply. This is turn scares several woman into thinking that losing weight whilst breastfeeding is not a wise decision. Breastfeeding shouldn't be looked on as a scary event. It is a breathtaking time in a woman's life.<br><br>The tiny tips revealed above are nothing yet little changes in a diet that confirm to be pretty effective in terms of your fat reduction efforts. Along with implementing these changes you equally have to understand much more about a complete weight loss program which can promote efficient fat reduction. |
| {{refimprove|date=October 2012}}
| |
| In [[relational database]] theory, a '''functional dependency''' is a '''[[Relational database#Constraints|constraint]]''' between two sets of attributes in a [[Relation (database)|relation]] from a database.
| |
| | |
| Given a relation ''R'', a set of attributes ''X'' in ''R'' is said to '''functionally determine''' another set of attributes ''Y'', also in ''R'', (written ''X'' → ''Y'') if, and only if, each ''X'' value is associated with precisely one ''Y'' value; ''R'' is then said to ''satisfy'' the functional dependency ''X'' → ''Y''. Equivalently, the [[projection (relational algebra)|projection]] <math>\pi_{X,Y}R</math> is a [[function (mathematics)|function]], i.e. ''Y'' is a function of ''X''.<ref name="HalpinMorgan2008">{{cite book |author1=Terry Halpin |title=Information Modeling and Relational Databases |url=http://books.google.com/books?id=puO_VlbR_x4C&pg=PA140 |year=2008 |publisher=Morgan Kaufmann |isbn=978-0-12-373568-3 |page=140 |edition=2nd}}</ref><ref name="Date2012">{{cite book |author=Chris Date |title=Database Design and Relational Theory: Normal Forms and All That Jazz |url=http://books.google.com/books?id=8jAGhpMSjAcC&pg=PA21 |year=2012 |publisher=O'Reilly Media, Inc. |isbn=978-1-4493-2801-6 |page=21}}</ref> In simple words, if the values for the ''X'' attributes are known (say they are ''x''), then the values for the ''Y'' attributes corresponding to ''x'' can be determined by looking them up in ''any'' [[Tuple#Relational model|tuple]] of ''R'' containing ''x''. Customarily ''X'' is called the ''determinant'' set and ''Y'' the ''dependent'' set. A functional dependency FD: ''X'' → ''Y'' is called ''trivial'' if ''Y'' is a [[subset]] of ''X''.
| |
| | |
| The determination of functional dependencies is an important part of designing databases in the [[relational model]], and in [[database normalization]] and [[denormalization]]. A simple application of functional dependencies is '''Heath’s theorem'''; it says that a relation ''R'' over an attribute set ''U'' and satisfying a functional dependency ''X'' → ''Y'' can be safely split in two relations having the [[lossless-join decomposition]] property, namely into <math>\pi_{XY}(R)\bowtie\pi_{XZ}(R) = R</math> where ''Z'' = ''U'' − ''XY'' are the rest of the attributes. ([[set union|Union]]s of attribute sets are customarily denoted by mere juxtapositions in database theory.) An important notion in this context is a [[candidate key]], defined as a minimal set of attributes that functionally determine all of the attributes in a relation. The functional dependencies, along with the [[attribute domain]]s, are selected so as to generate constraints that would exclude as much data inappropriate to the [[user domain]] from the system as possible.
| |
| | |
| A notion of [[logical implication]] is defined for functional dependencies in the following way: a set of functional dependencies <math>\Sigma</math> logically implies another set of dependencies <math>\Gamma</math>, if any relation ''R'' satisfying all dependencies from <math>\Sigma</math> also satisfies all dependencies from <math>\Gamma</math>; this is usually written <math>\Sigma \models \Gamma</math>. The notion of logical implication for functional dependencies admits a [[soundness|sound]] and [[completeness|complete]] finite [[axiomatization]], known as '''Armstrong's axioms'''.
| |
| | |
| == Examples ==
| |
| | |
| === Cars ===
| |
| Suppose one is designing a system to track vehicles and the capacity of their engines. Each vehicle has a unique [[vehicle identification number]] (VIN). One would write '''VIN''' → '''EngineCapacity''' because it would be inappropriate for a vehicle's engine to have more than one capacity. (Assuming, in this case, that vehicles only have one engine.) However, ''EngineCapacity'' → ''VIN'', is incorrect because there could be many vehicles with the same engine capacity.
| |
| | |
| This functional dependency may suggest that the attribute EngineCapacity be placed in a relation with [[candidate key]] VIN. However, that may not always be appropriate. For example, if that functional dependency occurs as a result of the [[transitive relation|transitive]] functional dependencies VIN → VehicleModel and VehicleModel → EngineCapacity then that would not result in a normalized relation.
| |
| | |
| === Lectures ===
| |
| This example illustrates the concept of functional dependency. The situation modelled
| |
| is that of college students visiting one or more lectures in each of which they are assigned
| |
| a teaching assistant (TA). Let's further assume that every student is in some semester
| |
| and is identified by a unique integer ID.
| |
| | |
| {| class="wikitable"
| |
| |-
| |
| ! StudentID !! Semester !! Lecture !! TA
| |
| |-
| |
| | 1234 || 6 || Numerical Methods || Azhar
| |
| |-
| |
| | 2380 || 4 || Numerical Methods || Peter
| |
| |-
| |
| | 1234 || 6 || Visual Computing || Ahmed
| |
| |-
| |
| | 1201 || 4 || Numerical Methods || Peter
| |
| |-
| |
| | 1201 || 4 || Physics II || Simone
| |
| |}
| |
| | |
| We notice that whenever two rows in this table feature the same StudentID,
| |
| they also necessarily have the same Semester values. This basic fact
| |
| can be expressed by a functional dependency:
| |
| * StudentID → Semester.
| |
| | |
| Other nontrivial functional dependencies can be identified, for example:
| |
| * {StudentID, Lecture} → TA
| |
| * {StudentID, Lecture} → {TA, Semester}
| |
| | |
| The latter expresses the fact that the set {StudentID, Lecture} is a [[superkey]] of the relation.
| |
| | |
| == Properties and axiomatization of functional dependencies ==
| |
| Given that ''X'', ''Y'', and ''Z'' are sets of attributes in a relation ''R'', one can derive several properties of functional dependencies. Among the most important are the following, usually called [[Armstrong's axioms]]:<ref name="SilberschatzKorth2010a">{{cite book|author1=Abraham Silberschatz|author2=Henry Korth|author3=S. Sudarshan|title=Database System Concepts|year=2010|publisher=McGraw-Hill|isbn=978-0-07-352332-3|edition=6th|page=339}}</ref>
| |
| * '''Reflexivity''': If ''Y'' is a subset of ''X'', then ''X'' → ''Y''
| |
| * '''Augmentation''': If ''X'' → ''Y'', then ''XZ'' → ''YZ''
| |
| * '''Transitivity''': If ''X'' → ''Y'' and ''Y'' → ''Z'', then ''X'' → ''Z''
| |
| | |
| "Reflexivity" can be weakened to just <math>X \rightarrow \varnothing</math>, i.e. it is an actual [[axiom]], where the other two are proper [[inference rules]], more precisely giving rise to the following rules of syntactic consequence:<ref name="Vardi">M. Y. Vardi. [http://www.cs.rice.edu/~vardi/papers/ttcs87.pdf Fundamentals of dependency theory]. In E. Borger, editor, Trends in Theoretical
| |
| Computer Science, pages 171–224. Computer Science Press, Rockville, MD, 1987. ISBN 0881750840</ref>
| |
| | |
| <math>\vdash X \rightarrow \varnothing</math><br/>
| |
| <math>X \rightarrow Y \vdash XZ \rightarrow YZ</math><br/>
| |
| <math>X \rightarrow Y, Y \rightarrow Z \vdash X \rightarrow Z</math>.
| |
| | |
| These three rules are a [[Soundness|sound]] and [[Completeness|complete]] axiomatization of functional dependencies. This axiomatization is sometimes described as finite because the number of inference rules is finite,<ref name="alice">{{Citation
| |
| |last=Abiteboul
| |
| |first=Serge
| |
| |author-link=Serge Abiteboul
| |
| |last2=Hull
| |
| |first2=Richard B.
| |
| |author2-link=Richard B. Hull
| |
| |last3=Vianu
| |
| |first3=Victor
| |
| |author3-link=Victor Vianu
| |
| |title=Foundations of Databases
| |
| |publisher=Addison-Wesley
| |
| |year=1995
| |
| |isbn=0-201-53771-0
| |
| |url=http://webdam.inria.fr/Alice/
| |
| |pages=164–168
| |
| }}</ref> with the caveat that the axiom and rules of inference are all [[Schema (logic)|schemata]], meaning that the ''X'', ''Y'' and ''Z'' range over all ground terms (attribute sets).<ref name="Vardi"/>
| |
| | |
| From these rules, we can derive these secondary rules:<ref name="SilberschatzKorth2010a"/>
| |
| * '''Union''': If ''X'' → ''Y'' and ''X'' → ''Z'', then ''X'' → ''YZ''
| |
| * '''Decomposition''': If ''X'' → ''YZ'', then ''X'' → ''Y'' and ''X'' → ''Z''
| |
| * '''Pseudotransitivity''': If ''X'' → ''Y'' and ''WY'' → ''Z'', then ''WX'' → ''Z''
| |
| | |
| The union and decomposition rules can be combined in a [[logical equivalence]] stating that
| |
| ''X'' → ''YZ'', holds [[iff]] ''X'' → ''Y'' and ''X'' → ''Z''. This is sometimes called the splitting/combining rule.<ref name="Garcia-MolinaUllman2009">{{cite book|author1=Hector Garcia-Molina|author2=Jeffrey D. Ullman|author3=Jennifer Widom|title=Database systems: the complete book|year=2009|publisher=Pearson Prentice Hall|isbn=978-0-13-187325-4|edition=2nd|page=73}}</ref>
| |
| | |
| Another rule that is sometimes handy is:<ref name="Singh2009">{{cite book|author=S. K. Singh|title=Database Systems: Concepts, Design & Applications|url=http://books.google.com/books?id=8PNCKe2SpRwC&pg=PA323|year=2009|origyear=2006|publisher=Pearson Education India|isbn=978-81-7758-567-4|page=323}}</ref>
| |
| * '''Composition''': If ''X'' → ''Y'' and ''Z'' → ''W'', then ''XZ'' → ''YW''
| |
| | |
| Equivalent sets of functional dependencies are called ''covers'' of each other. Every set of functional dependencies has a [[canonical cover]].
| |
| | |
| == 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 '''Heath’s theorem'''; it is one of the early results in database theory.<ref>{{cite doi|10.1145/1734714.1734717}} 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]|url=http://www.almaden.ibm.com/cs/people/fagin/mip86.pdf|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=23}}
| |
| *{{cite book|author=C. Date|title=Database in Depth: Relational Theory for Practitioners|url=http://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 dependencies]] whereas inclusion dependencies are [[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's 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}}
| |
| | |
| == Irreducible function depending set ==
| |
| A functional depending set S is irreducible if the set has the following three properties:
| |
| | |
| # Each right set of a functional dependency of S contains only one attribute.
| |
| # Each left set of a functional dependency of S is irreducible. It means that reducing any one attribute from left set will change the content of S (S will lose some information).
| |
| # Reducing any functional dependency will change the content of S.
| |
| | |
| Sets of Functional Dependencies(FD) with these properties are also called ''canonical'' or ''minimal''.
| |
| | |
| == See also ==
| |
| * [[Chase (algorithm)]]
| |
| * [[Inclusion dependency]]
| |
| * [[Join dependency]]
| |
| * [[Multivalued dependency]] (MVD)
| |
| * [[Database normalization]]
| |
| * [[First normal form]]
| |
| | |
| == References ==
| |
| {{reflist}}
| |
| | |
| == External links ==
| |
| * {{cite web
| |
| | url=http://www.cs.umbc.edu/courses/461/current/burt/lectures/lec14/
| |
| | publisher=[[University of Maryland Baltimore County]] Department of Computer Science and Electrical Engineering
| |
| | author=Gary Burt
| |
| | title=CS 461 (Database Management Systems) lecture notes
| |
| | date=summer, 1999
| |
| }}
| |
| * {{cite web
| |
| | url=http://www-db.stanford.edu/~ullman/cs345notes/slides01-1.ps
| |
| | title=CS345 Lecture Notes
| |
| | publisher=Stanford University
| |
| | author=Jeffrey D. Ullman
| |
| | format=[[PostScript]]
| |
| }}
| |
| * {{cite web
| |
| | url=http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter6/node10.html
| |
| | author=Osmar Zaiane
| |
| | date=June 9, 1998
| |
| | title=CMPT 354 (Database Systems I) lecture notes
| |
| | chapter=Chapter 6: Integrity constraints
| |
| | publisher=[[Simon Fraser University]] Department of Computing Science
| |
| }}
| |
| | |
| [[Category:Data modeling]]
| |
| [[Category:Database constraints]]
| |
| [[Category:Database theory]]
| |
If you've gained a limited pounds in recent years, you are wondering, "How do I lose fat?" And, you probably desire to do thus promptly plus conveniently. It's additionally a prevalent (and normally correct) perception which if you need to lose fat, we do thus gradually plus carefully in purchase to be healthy about it. There is a method to lose weight, though, where you are able to do it fast plus be healthy regarding it -- plus have it be permanent too.
The Grapefruit Diet. The grapefruit diet is one of the greatest diets to lose weight fast. People participating inside this diet lose a typical of 10 pounds inside lower than 2 weeks. The grapefruit diet is low inside calories plus low in fat. During this diet, grapefruit is consumed at every meal with a small serving of vegetables and lean protein. The grapefruit diet is awesome for fast fat loss, however should only be selected short-term to lose a limited amount of weight, such as 10 to 15 pounds.
Trick the body. A mistake folks often create is trying to learn how to lose weight only by dieting. This is tough, because as the calories lessen, a body will try and keep itself secure inside case the calories dry up altogether in the future - plus it does this by turning the fat storage up to maximum - creating more food than ever be turned into fat. Counteract this by exercising first, which will receive the body into the mode of burning fat, not storing it.
To see rapid weight loss simply begin minimize the size of your food plus eat more frequently. And you are able to accomplish this by breaking your daily food into 4 smaller meals plus two snacks.
Have 2 slices of wheat bread with some soy cheese spread on them. Prepare a fruit salad that contains pineapple chunks, kiwi fruit, papaya, passion fruit with some how to lose weight fast topping of muesli. Grill this mixture for five minutes. This breakfast must contribute about 288 calories.
Every mother which chooses to breastfeeds frequently wonders if the baby is getting enough to eat and if all is going effectively. Since you can not keep track of how countless ounces the baby is taking in, it is very usually a question on a unique mom's notice. Some are even told that they require to eat a great deal of additional food while nursing to keep up with all the milk supply. This is turn scares several woman into thinking that losing weight whilst breastfeeding is not a wise decision. Breastfeeding shouldn't be looked on as a scary event. It is a breathtaking time in a woman's life.
The tiny tips revealed above are nothing yet little changes in a diet that confirm to be pretty effective in terms of your fat reduction efforts. Along with implementing these changes you equally have to understand much more about a complete weight loss program which can promote efficient fat reduction.