Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Since you're in a db theory course, I'm going to assume you have SQL experience and try and relate the theory to the implementation context.</p> <p>Basically, a relation is what you would refer to as a table in implementation and a key is ANY set of attributes (read columns) which can be used to identify a UNIQUE row (in db theory this would be a tuple). The simplest analogy here is that a key is your primary key, as well as any other possible set of columns you can use to identify a single tuple in your relation (row in your table). So, here are the basic steps for doing this (I'll walk through example A, and then you can try the rest):</p> <ol> <li>List all of the attributes which are NOT in your proposed key (so BCDEF does not include A and G).</li> <li><p>For each attribute you're missing, go through the list of functional dependencies and see if your proposed key is capable of inferring the attribute you're missing.</p> <pre><code> a. So for A, you have BC -&gt; A. Since both B and C are in the proposed key BCDEF, you can infer that BCDEF -&gt; A. Your set now becomes BCDEFA. b. For G, again going through your FDs you find EF -&gt; G. Since both E and F are in BCDEFA, you can infer BCDEFA -&gt; G. </code></pre></li> </ol> <p>Because you were able to infer both A and G from BCDEF, option a is a key of the relation ABCDEFG. I know there is an algorithm for this, and it is probably in your course text somewhere. There is also probably an example. You should step through it manually until the pattern is intuitive. </p> <p>EDIT: The reason I would go back through the text to look for this algorithm is that chances are your exam is going to be written as opposed to multiple choice since it is a db theory course. If this is true then you would get more partial credit if you can methodically follow notation demonstrated in your course text/notes.</p> <p>The main goal is to turn the key into the relation, which should prove that the proposed key is in fact a key. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload