Egyptian fraction: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Josve05a
m clean up, typo(s) fixed: , → , using AWB (9543)
en>David Eppstein
reorder sections so that the history isn't split up by non-history stuff
 
Line 1: Line 1:
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
It is very common to have a dental emergency -- a fractured tooth, an abscess, or severe pain when chewing. Over-the-counter pain medication is just masking the problem. Seeing an emergency dentist is critical to getting the source of the problem diagnosed and corrected as soon as possible.<br><br>Here are some common dental emergencies:<br>Toothache: The most common dental emergency. This generally means a badly decayed tooth. As the pain affects the tooth's nerve, treatment involves gently removing any debris lodged in the cavity being careful not to poke deep as this will cause severe pain if the nerve is touched. Next rinse vigorously with warm water. Then soak a small piece of cotton in oil of cloves and insert it in the cavity. This will give temporary relief until a dentist can be reached.<br><br>At times the pain may have a more obscure location such as decay under an old filling. As this can be only corrected by a dentist there are two things you can do to help the pain. Administer a pain pill (aspirin or some other analgesic) internally or dissolve a tablet in a half glass (4 oz) of warm water holding it in the mouth for several minutes before spitting it out. DO NOT PLACE A WHOLE TABLET OR ANY PART OF IT IN THE TOOTH OR AGAINST THE SOFT GUM TISSUE AS IT WILL RESULT IN A NASTY BURN.<br><br>Swollen Jaw: This may be caused by several conditions the most probable being an abscessed tooth. In any case the treatment should be to reduce pain and swelling. An ice pack held on the outside of the jaw, (ten minutes on and ten minutes off) will take care of both. If this does not control the pain, an analgesic tablet can be given every four hours.<br><br>Other Oral Injuries: Broken teeth, cut lips, bitten tongue or lips if severe means a trip to a dentist as soon as possible. In the mean time rinse the mouth with warm water and place cold compression the face opposite the injury. If there is a lot of bleeding, apply direct pressure to the bleeding area. If bleeding does not stop get patient to the emergency room of a hospital as stitches may be necessary.<br><br>Prolonged Bleeding Following Extraction: Place a gauze pad or better still a moistened tea bag over the socket and have the patient bite down gently on it for 30 to 45 minutes. The tannic acid in the tea seeps into the tissues and often helps stop the bleeding. If bleeding continues after two hours, call the dentist or take patient to the emergency room of the nearest hospital.<br><br>Broken Jaw: If you suspect the patient's jaw is broken, bring the upper and lower teeth together. Put a necktie, handkerchief or towel under the chin, tying it over the head to immobilize the jaw until you can get the patient to a dentist or the emergency room of a hospital.<br><br>Painful Erupting Tooth: In young children teething pain can come from a loose baby tooth or from an erupting permanent tooth. Some relief can be given by crushing a little ice and wrapping it in gauze or a clean piece of cloth and putting it directly on the tooth or gum tissue where it hurts. The numbing effect of the cold, along with an appropriate dose of aspirin, usually provides temporary relief.<br><br>In young adults, an erupting 3rd molar (Wisdom tooth), especially if it is impacted, can cause the jaw to swell and be quite painful. Often the gum around the tooth will show signs of infection. Temporary relief can be had by giving aspirin or some other painkiller and by dissolving an aspirin in half a glass of warm water and holding this solution in the mouth over the sore gum. AGAIN DO NOT PLACE A TABLET DIRECTLY OVER THE GUM OR CHEEK OR USE THE ASPIRIN SOLUTION ANY STRONGER THAN RECOMMENDED TO PREVENT BURNING THE TISSUE. The swelling of the jaw can be reduced by using an ice pack on the outside of the face at intervals of ten minutes on and ten minutes off.<br><br>In case you loved this short article and you would like to receive more details with regards to [http://www.youtube.com/watch?v=90z1mmiwNS8 Dentists in DC] assure visit the web site.
# 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).
 
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'':
 
{| class="wikitable"
|+ ''r1''
|-
! A
! B
! 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]]

Latest revision as of 07:02, 4 January 2015

It is very common to have a dental emergency -- a fractured tooth, an abscess, or severe pain when chewing. Over-the-counter pain medication is just masking the problem. Seeing an emergency dentist is critical to getting the source of the problem diagnosed and corrected as soon as possible.

Here are some common dental emergencies:
Toothache: The most common dental emergency. This generally means a badly decayed tooth. As the pain affects the tooth's nerve, treatment involves gently removing any debris lodged in the cavity being careful not to poke deep as this will cause severe pain if the nerve is touched. Next rinse vigorously with warm water. Then soak a small piece of cotton in oil of cloves and insert it in the cavity. This will give temporary relief until a dentist can be reached.

At times the pain may have a more obscure location such as decay under an old filling. As this can be only corrected by a dentist there are two things you can do to help the pain. Administer a pain pill (aspirin or some other analgesic) internally or dissolve a tablet in a half glass (4 oz) of warm water holding it in the mouth for several minutes before spitting it out. DO NOT PLACE A WHOLE TABLET OR ANY PART OF IT IN THE TOOTH OR AGAINST THE SOFT GUM TISSUE AS IT WILL RESULT IN A NASTY BURN.

Swollen Jaw: This may be caused by several conditions the most probable being an abscessed tooth. In any case the treatment should be to reduce pain and swelling. An ice pack held on the outside of the jaw, (ten minutes on and ten minutes off) will take care of both. If this does not control the pain, an analgesic tablet can be given every four hours.

Other Oral Injuries: Broken teeth, cut lips, bitten tongue or lips if severe means a trip to a dentist as soon as possible. In the mean time rinse the mouth with warm water and place cold compression the face opposite the injury. If there is a lot of bleeding, apply direct pressure to the bleeding area. If bleeding does not stop get patient to the emergency room of a hospital as stitches may be necessary.

Prolonged Bleeding Following Extraction: Place a gauze pad or better still a moistened tea bag over the socket and have the patient bite down gently on it for 30 to 45 minutes. The tannic acid in the tea seeps into the tissues and often helps stop the bleeding. If bleeding continues after two hours, call the dentist or take patient to the emergency room of the nearest hospital.

Broken Jaw: If you suspect the patient's jaw is broken, bring the upper and lower teeth together. Put a necktie, handkerchief or towel under the chin, tying it over the head to immobilize the jaw until you can get the patient to a dentist or the emergency room of a hospital.

Painful Erupting Tooth: In young children teething pain can come from a loose baby tooth or from an erupting permanent tooth. Some relief can be given by crushing a little ice and wrapping it in gauze or a clean piece of cloth and putting it directly on the tooth or gum tissue where it hurts. The numbing effect of the cold, along with an appropriate dose of aspirin, usually provides temporary relief.

In young adults, an erupting 3rd molar (Wisdom tooth), especially if it is impacted, can cause the jaw to swell and be quite painful. Often the gum around the tooth will show signs of infection. Temporary relief can be had by giving aspirin or some other painkiller and by dissolving an aspirin in half a glass of warm water and holding this solution in the mouth over the sore gum. AGAIN DO NOT PLACE A TABLET DIRECTLY OVER THE GUM OR CHEEK OR USE THE ASPIRIN SOLUTION ANY STRONGER THAN RECOMMENDED TO PREVENT BURNING THE TISSUE. The swelling of the jaw can be reduced by using an ice pack on the outside of the face at intervals of ten minutes on and ten minutes off.

In case you loved this short article and you would like to receive more details with regards to Dentists in DC assure visit the web site.