Egyptian fraction: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Stephenwanjau
m Reverted edit(s) by 106.202.34.116 identified as test/vandalism using STiki
 
en>Josve05a
m clean up, typo(s) fixed: , → , using AWB (9543)
Line 1: Line 1:
== in order to indicate the direction ==
In the [[relational model]] of [[database]]s, a '''candidate key''' of a [[Relation (database)|relation]] is a minimal [[superkey]] for that relation; that is, a [[set (mathematics)|set]] of attributes such that
# the relation does not have two distinct [[tuple]]s (i.e. rows or records in common database language) with the same values for these attributes (which means that the set of attributes is a superkey)
# there is no [[proper subset]] of these attributes for which (1) holds (which means that the set is minimal).


This time can be good, the one facing the wall, hands, mouse knife, cut a few people even rub Cengceng belt, rushing pants came down, bare hairy thighs, stunned no one would dare bend waist mention.<br><br>him shoving a security guard's shirt cut injured hand wrapped in a large, wrapped [http://www.dmwai.com/webalizer/kate-spade-8.html 財布 ケイトスペード] in horror found sitting untouched Wang Qian, the lofty, elusive Du Shu master, this time to see the mouse is angry from the heart, lift one foot to kick the old man was Gu Lulu rolled on the ground, the standard is not vent brother tried to stamp his legs, while stamp edge swore:<br><br>'Fuck you had a [http://www.dmwai.com/webalizer/kate-spade-8.html ハンドバッグ ケイトスペード] force, not a good when the gambler, but also play with [http://www.dmwai.com/webalizer/kate-spade-4.html kate spade バッグ] guns knife ...... I play when the police find Liangqian easy it is also special What I inserted a knife.'<br><br>At this point, the advance team has stormed into the building, in order to indicate the direction, out of the mouse to [http://www.dmwai.com/webalizer/kate-spade-7.html ケイトスペード 財布 通販] push the door open, place a few boxes of chips fling, when Lang Lang rolled over the ground, rolling down the stairs down a lot, direct indicates a follow-up team tracking from.<br><br>internal [http://www.dmwai.com/webalizer/kate-spade-11.html バッグ ケイトスペード] security forces is not without foot seven or eight armed guards, just stuck in the hallway,
The constituent attributes are called '''prime attributes'''. Conversely, an attribute that does not occur in ANY candidate key is called a '''non-prime attribute'''.
相关的主题文章:
<ul>
 
  <li>[http://pujiang.mala.cn/home.php?mod=space&uid=3204616 http://pujiang.mala.cn/home.php?mod=space&uid=3204616]</li>
 
  <li>[http://www.imc-e.net/thread-1311650-1-1.html http://www.imc-e.net/thread-1311650-1-1.html]</li>
 
  <li>[http://tour.holm.ru/cgi-bin/guest.cgi http://tour.holm.ru/cgi-bin/guest.cgi]</li>
 
</ul>


== also be sure to want to truly reflect on the organization ==
Since a relation contains no duplicate tuples, the set of all its attributes is a superkey if NULL values are not used. It follows that every relation will have at least one candidate key.


Required to truthfully report to the organization ...... last night to now, more than a dozen hours, all what happened in detail after you repeat it again, especially with a horse Shuo contact details. 'Any Red City Road.<br><br>'contact, no, I'm not trying to curry favor with curry favor, give them something to do.' I sin road.<br><br>'gave you bribe is not it?' Any red city once thought. More than sin smiled, the kind Zeixiao, each turned over loot he muttered not happy, either whispered the old: [http://www.dmwai.com/webalizer/kate-spade-8.html 財布 ケイトスペード] 'These, also be sure to want to truly [http://www.dmwai.com/webalizer/kate-spade-15.html ケイトスペード クラッチバッグ] reflect on the organization, handed over in full, all the stolen money, do Do not born [http://www.dmwai.com/webalizer/kate-spade-5.html ケイトスペード バッグ 激安] crooked heart appropriation ah, a lot of Secret Service is [http://www.dmwai.com/webalizer/kate-spade-1.html ケイトスペード 財布 セール] to grasp the severity of a mistake in the above. '<br><br>'Oh, bribery, how turned ah, you ah.' I sin laughed.<br><br>'ah? send you a woman? 'old office was shocked, it seems that the other [http://www.dmwai.com/webalizer/kate-spade-5.html ケイトスペード 財布 ゴールド] side really willing to lower costs.<br><br>'No, sent three.' I sin bristling three fingers, and then facing staggering any way with the old: 'Do not stare at me, I press organizations require full access
The candidate keys of a relation tell us all the possible ways we can identify its tuples. As such they are an important concept for the design of [[database schema]].
相关的主题文章:
 
  <ul>
==Example==
    
The definition of candidate keys can be illustrated with the following (abstract) example. Consider a relation variable (relvar) ''R'' with attributes (''A'', ''B'', ''C'', ''D'') that has only the following two legal values ''r1'' and ''r2'':
  <li>[http://www.main-family.com/cgi-bin/search.cgi http://www.main-family.com/cgi-bin/search.cgi]</li>
 
 
{| class="wikitable"
  <li>[http://entheogenwiki.org/wiki/User:Vmutakszbh#let.27s_work_together_to_get_it_to..27_Dong_Shao_Jun_emphasizes http://entheogenwiki.org/wiki/User:Vmutakszbh#let.27s_work_together_to_get_it_to..27_Dong_Shao_Jun_emphasizes]</li>
|+ ''r1''
 
|-
  <li>[http://kometonya.com/cgi/oomiya1/bbs14.cgi http://kometonya.com/cgi/oomiya1/bbs14.cgi]</li>
! A
 
! B
</ul>
! C
! D
|-
| a1
| b1
| c1
| d1
|-
| a1
| b2
| c2
| d1
|-
| a2
| b1
| c2
| d1
|}
 
{| class="wikitable"
|+ ''r2''
|-
! A
! B
! C
! D
|-
| a1
| b1
| c1
| d1
|-
| a1
| b2
| c2
| d1
|-
| a1
| b1
| c2
| d2
|}
 
Here ''r2'' differs from ''r1'' only in the '''A''' and '''D''' values of the last tuple.
 
For ''r1'' the following sets have the uniqueness property, i.e., there are no two distinct tuples in the instance with the same values for the attributes in the set:
: {A,B}, {A,C}, {B,C}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}
For ''r2'' the uniqueness property holds for the following sets;
: {B,C}, {B,D}, {C,D}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}
Since superkeys of a relvar are those sets of attributes that have the uniqueness property for ''all'' legal values of that relvar and because we assume that ''r1'' and ''r2'' are all the legal values that ''R'' can take, we can determine the set of superkeys of ''R'' by taking the intersection of the two lists:
: {B,C}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}
Finally we need to select those sets for which there is no [[proper subset]] in the list, which are in this case:
: {B,C}, {A,B,D}, {A,C,D}
These are indeed the candidate keys of relvar ''R''.
 
We have to consider ''all'' the relations that might be assigned to a relvar to determine whether a certain set of attributes is a candidate key. For example, if we had considered only ''r1'' then we would have concluded that {A,B} is a candidate key, which is incorrect. However, we ''might'' be able to conclude from such a relation that a certain set is ''not'' a candidate key, because that set does not have the uniqueness property (example {A,D} for ''r1''). Note that the existence of a proper subset of a set that has the uniqueness property ''cannot'' in general be used as evidence that the superset is not a candidate key.  In particular, note that in the case of an empty relation, every subset of the heading has the uniqueness property, including the empty set.
 
==Determining candidate keys==
The set of all candidate keys can be computed
e.g. from the set of [[Functional dependency|functional dependencies]].
To this end we need to define the attribute closure <math>\alpha^+</math> for an attribute set <math>\alpha</math>.
The set <math>\alpha^+</math> contains all attributes that are functionally implied by <math>\alpha</math>.
 
It is quite simple to find a single candidate key.
We start with a set <math>\alpha</math> of attributes and try to remove successively each attribute.
If after removing an attribute the attribute closure stays the same,
then this attribute is not necessary and we can remove it permanently.
We call the result <math>\text{minimize}(\alpha)</math>.
If <math>\alpha</math> is the set of all attributes,
then <math>\text{minimize}(\alpha)</math> is a candidate key.
 
Actually we can detect every candidate key with this procedure
by simply trying every possible order of removing attributes.
However there are much more [[permutation]]s of attributes (<math>n!</math>)
than [[power set|subsets]] (<math>2^n</math>).
That is, many attribute orders will lead to the same candidate key.
 
There is a fundamental difficulty for efficient algorithms for candidate key computation:
Certain sets of functional dependencies lead to exponentially many candidate keys.
Consider the <math>2\cdot n</math> functional dependencies
<math>\{A_i \rightarrow B_i : i\in\{1,\dots,n\}\} \cup \{B_i \rightarrow A_i : i\in\{1,\dots,n\}\}</math>
which yields <math>2^n</math> candidate keys:
<math>\{A_1, B_1\} \times \dots \times \{A_n, B_n\}</math>.
That is, the best we can expect is an algorithm that is efficient with respect to the number of candidate keys.
 
The following algorithm actually runs in polynomial time in the number of candidate keys and functional dependencies:<ref>
{{cite journal
| last1 =L. Lucchesi
| first1 =Cláudio
| last2 =Osborn
| first2 =Sylvia L.
| title =Candidate keys for relations
| journal =Journal of Computer and System Sciences
| volume =17
| issue =2
| pages =270–279
  | date =October 1978
}}
</ref>
   K[0] := minimize(A);  /* A is the set of all attribute */
  n := 1; /* Number of Keys known so far */
  i := 0; /* Currently processed key */
  while i < n do
    foreach α → β ∈ F do
      S := α ∪ (K[i] − β);
      found := false;
      for j := 0 to n-1 do
        if K[j] ⊆ S then found := true;
      if not found then
        K[n] := minimize(S);
        n := n + 1;
 
The idea behind the algorithm is that given a candidate key <math>K_i</math>
and a functional dependency <math>\alpha \rightarrow \beta</math>,
the reverse application of the functional dependency yields
the set  <math>\alpha \cup (K_i \setminus \beta)</math>,
which is a key, too.
It may however be covered by other already known candidate keys.
(The algorithm checks this case using the 'found' variable.)
If not, then minimizing the new key yields a new candidate key.
The key insight is (pun not intended) that all candidate keys can be created this way.
 
==See also==
* [[Alternate key]]
* [[Compound key]]
* [[Database normalization]]
* [[Primary key]]
* [[Relational database]]
* [[Superkey]]
* [[Prime implicant]] is the corresponding notion of a candidate key in [[boolean logic]]
 
==References==
 
{{reflist}}
* {{cite book
| last = Date
| first = Christopher
| authorlink = Christopher J. Date
| title = An Introduction to Database Systems
| publisher = Addison-Wesley
| isbn = 978-0-321-18956-1
| year = 2003
| pages = 268–276
| chapter = 5: Integrity
}}
 
==External links==
* [http://rdbms.opengrass.net/2_Database%20Design/2.1_TermsOfReference/2.1.2_Keys.html Relational Database Management Systems - Database Design - Terms of Reference - Keys]: An overview of the different types of keys in an RDBMS (Relational Database Management System).
 
{{Databases}}
 
{{DEFAULTSORT:Candidate Key}}
[[Category:Data modeling]]

Revision as of 14:22, 17 October 2013

In the relational model of databases, a candidate key of a relation is a minimal superkey for that relation; that is, a set of attributes such that

  1. the relation does not have two distinct tuples (i.e. rows or records in common database language) with the same values for these attributes (which means that the set of attributes is a superkey)
  2. there is no proper subset of these attributes for which (1) holds (which means that the set is minimal).

The constituent attributes are called prime attributes. Conversely, an attribute that does not occur in ANY candidate key is called a non-prime attribute.

Since a relation contains no duplicate tuples, the set of all its attributes is a superkey if NULL values are not used. It follows that every relation will have at least one candidate key.

The candidate keys of a relation tell us all the possible ways we can identify its tuples. As such they are an important concept for the design of database schema.

Example

The definition of candidate keys can be illustrated with the following (abstract) example. Consider a relation variable (relvar) R with attributes (A, B, C, D) that has only the following two legal values r1 and r2:

r1
A B C D
a1 b1 c1 d1
a1 b2 c2 d1
a2 b1 c2 d1
r2
A B C D
a1 b1 c1 d1
a1 b2 c2 d1
a1 b1 c2 d2

Here r2 differs from r1 only in the A and D values of the last tuple.

For r1 the following sets have the uniqueness property, i.e., there are no two distinct tuples in the instance with the same values for the attributes in the set:

{A,B}, {A,C}, {B,C}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}

For r2 the uniqueness property holds for the following sets;

{B,C}, {B,D}, {C,D}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}

Since superkeys of a relvar are those sets of attributes that have the uniqueness property for all legal values of that relvar and because we assume that r1 and r2 are all the legal values that R can take, we can determine the set of superkeys of R by taking the intersection of the two lists:

{B,C}, {A,B,C}, {A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}

Finally we need to select those sets for which there is no proper subset in the list, which are in this case:

{B,C}, {A,B,D}, {A,C,D}

These are indeed the candidate keys of relvar R.

We have to consider all the relations that might be assigned to a relvar to determine whether a certain set of attributes is a candidate key. For example, if we had considered only r1 then we would have concluded that {A,B} is a candidate key, which is incorrect. However, we might be able to conclude from such a relation that a certain set is not a candidate key, because that set does not have the uniqueness property (example {A,D} for r1). Note that the existence of a proper subset of a set that has the uniqueness property cannot in general be used as evidence that the superset is not a candidate key. In particular, note that in the case of an empty relation, every subset of the heading has the uniqueness property, including the empty set.

Determining candidate keys

The set of all candidate keys can be computed e.g. from the set of functional dependencies. To this end we need to define the attribute closure α+ for an attribute set α. The set α+ contains all attributes that are functionally implied by α.

It is quite simple to find a single candidate key. We start with a set α of attributes and try to remove successively each attribute. If after removing an attribute the attribute closure stays the same, then this attribute is not necessary and we can remove it permanently. We call the result minimize(α). If α is the set of all attributes, then minimize(α) is a candidate key.

Actually we can detect every candidate key with this procedure by simply trying every possible order of removing attributes. However there are much more permutations of attributes (n!) than subsets (2n). That is, many attribute orders will lead to the same candidate key.

There is a fundamental difficulty for efficient algorithms for candidate key computation: Certain sets of functional dependencies lead to exponentially many candidate keys. Consider the 2n functional dependencies {AiBi:i{1,,n}}{BiAi:i{1,,n}} which yields 2n candidate keys: {A1,B1}××{An,Bn}. That is, the best we can expect is an algorithm that is efficient with respect to the number of candidate keys.

The following algorithm actually runs in polynomial time in the number of candidate keys and functional dependencies:[1]

 K[0] := minimize(A);  /* A is the set of all attribute */
 n := 1; /* Number of Keys known so far */
 i := 0; /* Currently processed key */
 while i < n do
   foreach α → β ∈ F do
     S := α ∪ (K[i] − β);
     found := false;
     for j := 0 to n-1 do
       if K[j] ⊆ S then found := true;
     if not found then
       K[n] := minimize(S);
       n := n + 1;

The idea behind the algorithm is that given a candidate key Ki and a functional dependency αβ, the reverse application of the functional dependency yields the set α(Kiβ), which is a key, too. It may however be covered by other already known candidate keys. (The algorithm checks this case using the 'found' variable.) If not, then minimizing the new key yields a new candidate key. The key insight is (pun not intended) that all candidate keys can be created this way.

See also

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

  • 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534

External links

Template:Databases

  1. One of the biggest reasons investing in a Singapore new launch is an effective things is as a result of it is doable to be lent massive quantities of money at very low interest rates that you should utilize to purchase it. Then, if property values continue to go up, then you'll get a really high return on funding (ROI). Simply make sure you purchase one of the higher properties, reminiscent of the ones at Fernvale the Riverbank or any Singapore landed property Get Earnings by means of Renting

    In its statement, the singapore property listing - website link, government claimed that the majority citizens buying their first residence won't be hurt by the new measures. Some concessions can even be prolonged to chose teams of consumers, similar to married couples with a minimum of one Singaporean partner who are purchasing their second property so long as they intend to promote their first residential property. Lower the LTV limit on housing loans granted by monetary establishments regulated by MAS from 70% to 60% for property purchasers who are individuals with a number of outstanding housing loans on the time of the brand new housing purchase. Singapore Property Measures - 30 August 2010 The most popular seek for the number of bedrooms in Singapore is 4, followed by 2 and three. Lush Acres EC @ Sengkang

    Discover out more about real estate funding in the area, together with info on international funding incentives and property possession. Many Singaporeans have been investing in property across the causeway in recent years, attracted by comparatively low prices. However, those who need to exit their investments quickly are likely to face significant challenges when trying to sell their property – and could finally be stuck with a property they can't sell. Career improvement programmes, in-house valuation, auctions and administrative help, venture advertising and marketing, skilled talks and traisning are continuously planned for the sales associates to help them obtain better outcomes for his or her shoppers while at Knight Frank Singapore. No change Present Rules

    Extending the tax exemption would help. The exemption, which may be as a lot as $2 million per family, covers individuals who negotiate a principal reduction on their existing mortgage, sell their house short (i.e., for lower than the excellent loans), or take part in a foreclosure course of. An extension of theexemption would seem like a common-sense means to assist stabilize the housing market, but the political turmoil around the fiscal-cliff negotiations means widespread sense could not win out. Home Minority Chief Nancy Pelosi (D-Calif.) believes that the mortgage relief provision will be on the table during the grand-cut price talks, in response to communications director Nadeam Elshami. Buying or promoting of blue mild bulbs is unlawful.

    A vendor's stamp duty has been launched on industrial property for the primary time, at rates ranging from 5 per cent to 15 per cent. The Authorities might be trying to reassure the market that they aren't in opposition to foreigners and PRs investing in Singapore's property market. They imposed these measures because of extenuating components available in the market." The sale of new dual-key EC models will even be restricted to multi-generational households only. The models have two separate entrances, permitting grandparents, for example, to dwell separately. The vendor's stamp obligation takes effect right this moment and applies to industrial property and plots which might be offered inside three years of the date of buy. JLL named Best Performing Property Brand for second year running

    The data offered is for normal info purposes only and isn't supposed to be personalised investment or monetary advice. Motley Fool Singapore contributor Stanley Lim would not personal shares in any corporations talked about. Singapore private home costs increased by 1.eight% within the fourth quarter of 2012, up from 0.6% within the earlier quarter. Resale prices of government-built HDB residences which are usually bought by Singaporeans, elevated by 2.5%, quarter on quarter, the quickest acquire in five quarters. And industrial property, prices are actually double the levels of three years ago. No withholding tax in the event you sell your property. All your local information regarding vital HDB policies, condominium launches, land growth, commercial property and more

    There are various methods to go about discovering the precise property. Some local newspapers (together with the Straits Instances ) have categorised property sections and many local property brokers have websites. Now there are some specifics to consider when buying a 'new launch' rental. Intended use of the unit Every sale begins with 10 p.c low cost for finish of season sale; changes to 20 % discount storewide; follows by additional reduction of fiftyand ends with last discount of 70 % or extra. Typically there is even a warehouse sale or transferring out sale with huge mark-down of costs for stock clearance. Deborah Regulation from Expat Realtor shares her property market update, plus prime rental residences and houses at the moment available to lease Esparina EC @ Sengkang