![]() Let's look at the same example took while discussing Super Key to understand the working of a candidate key. However, if there is only one candidate key in a table, then it can be considered for both key constraints. Thus, from the number of obtained candidate keys, we can identify the appropriate primary key. It is because, in a table, we can have one or more than one candidate key, but we can create only one primary key for a table. How a Candidate key is different from a Primary KeyĪlthough the purpose of both candidate and the primary key is the same, that is to uniquely identify the tuples, and then also they are different from each other. The description of a candidate key is "no redundant attributes" and being a "minimal representation of a tuple," according to the Experts. Also, the value of a candidate key cannot be Null. The role of a candidate key is to identify a table row or column uniquely. In order to select the candidate keys from the set of super key, we need to look at the super key set. What is a Candidate KeyĪ candidate key is a subset of a super key set where the key which contains no redundant attribute is none other than a Candidate Key. We will also look at some examples that will make us to better understand the concept of a candidate key. ![]() Here, we will be discussing about candidate key, its role, as well as its use. A candidate key is a part of a key known as Super Key ( discussed in the previous section), where the super key is the super set of all those attributes that can uniquely identify a table. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |