Questions tagged [candidate-key]

A key is a set of attributes that is irreducibly unique and non-nullable within a table. Irreducible means that all the attributes of the key are necessary to guarantee uniqueness - remove any one attribute and the uniqueness property would be lost. A key may consist of zero, one or more attributes and a relational table (relation variable) must have at least one key and may have more than one.

A key is a set of attributes that is irreducibly unique and non-nullable within a table. Irreducible means that all the attributes of the key are necessary to guarantee uniqueness - remove any one attribute and the uniqueness property would be lost. A key may consist of zero, one or more attributes and a relational table (relation variable) must have at least one key and may have more than one.

97 questions
26
votes
7 answers

What is the difference between candidate key and composite key?

I am reading about candidate keys and composite keys. I came to know that a candidate key can qualify as a primary key and it can be a single column or combination of columns and a composite key is also a combination of columns. For composite key…
Shailesh Jaiswal
  • 3,606
  • 13
  • 73
  • 124
10
votes
2 answers

Finding candidate keys for given relation

R = (A, B, C, D, E) The functional dependencies are: A -> B ED -> A BC -> E It then lists the candidate keys as: ACD, BCD, CDE How are these candidate keys derived from the above FDs? Similarly, R = (A, B, C, D) The functional dependencies…
mickm
  • 281
  • 2
  • 6
  • 20
8
votes
3 answers

Are determinants and candidate keys the same?

At https://web.archive.org/web/20130514174856/http://databases.about.com/cs/specificproducts/g/determinant.htm I found this by Mike Chapple: Definition: A determinant in a database table is any attribute that you can use to determine the values…
Aparan
  • 1,263
  • 3
  • 12
  • 17
6
votes
1 answer

How do I create a composite candidate key for a table in SQL Server?

Please consider the following table definition... Table Definition CREATE TABLE [dbo].[Folders]( [Id] [int] IDENTITY(1,1) NOT NULL, [UserId] [int] NOT NULL, [ParentFolderId] [int] NULL PRIMARY KEY CLUSTERED ( [Id] ASC )WITH…
barrypicker
  • 9,740
  • 11
  • 65
  • 79
6
votes
2 answers

Candidate and Superkey

Given a relation schema R with n attributes R(A1, A2, ..., An). What’s the maximum number of possible super-keys for R? Please justify your answer. Given a relation schema R with n attributes R(A1, A2, ..., An). What’s the maximum number of possible…
chosenman
  • 93
  • 1
  • 2
  • 6
5
votes
1 answer

2nd Normal Form understanding candidate key

In order to understand what is second normal form I was reading some articles and there are some things that I don't understand . In the article here in the customer table it says it is not in 2NF because there are several attributes which don’t…
sam_rox
  • 739
  • 3
  • 14
  • 29
3
votes
1 answer

Candidate key constraint in Visual Paradigm 12.1

Is there any way to (visually) enforce candidate key constraint on an entity in an entity-relationship diagram in Visual Paradigm 12.1? For example we have an entity called Address (street, city, state, zipcode). I want to store the attributes (id,…
Slazer
  • 4,750
  • 7
  • 33
  • 60
3
votes
2 answers

Can prime attributes have null values?

I understand that a candidate key can not have NULL values. But a candidate key can itself be a combination of many attributes which are called prime attributes. Can these prime attributes have NULL as a value? Regards,
3
votes
1 answer

DBMS All keys combined confusion

i am confused in to keys in Database Managment System.as there are many partially questions...but this one is a good combined question.that's why i am posting here . Confusion Among SUPER KEY,KEY,PRIMARY KEY,ALTERNATE KEY,CANDIDATE KEY,MINIMAL…
Karan Patel
  • 89
  • 2
  • 2
  • 5
2
votes
1 answer

what is Partial Dependency

Suppose we have a relation R(A,B,C,D,E) with candidate keys {A,B} , {C,D} and let E be a non prime attribute. If there is a dependency C->E then it is partial dependency as E depends on a part of candidate key {C,D} Is dependency BC->E partial?
2
votes
1 answer

How to find a candidate key

I have a relation A,B,C,D,E with functional dependencies 1) A->BC 2) CD->E 3) B->D 4) E->A Using 1 gives A,D,E and then using 4 will make it D,E Using 2 gives A,B,C,D and then using 3 gives A,B,C and using 1 gives A Using 2 gives A,B,C,D and using 1…
2
votes
1 answer

BCNF, 3NF, and candidate keys

I am having issues understanding how to determine if relations are in BCNF, 3NF, and in general identifying the candidate keys of a relation. Consider relation R = (A, B, C, D) with the functional dependencies: AB -> C C -> D D -> A The questions…
sudo_coffee
  • 888
  • 1
  • 12
  • 26
2
votes
1 answer

Finding the Candidate Keys of a Relation Using the FD's

I have definitely checked out many different related posts, as suggested when creating this question. I have also done different sample problems from online sources as well from a similar problem. However, I am stuck on the problem below…
2
votes
1 answer

Can i have more candidate keys than columns?

Is it possible to have more than n candidate keys in table of n columns? I know that i can have exactly n candidate keys f.e. in table where every piece of every record is different. But how about more candidate keys?
Jac Mos
  • 7,746
  • 4
  • 15
  • 21
2
votes
1 answer

Table with unique identifier in Third normal form?

Suppose, I have a Table with the columns: person_id (primary key) first_name last_name birthday I also have a unique constraint on the combination {first_name, last_name} (I know that more people can have the same name, but I want to keep my…
1
2 3 4 5 6 7