9 votes

Does the concept of candidate key exist only in theory?

As far as I know, no SQL database management system (DBMS) supplies the CANDIDATE KEY keyword as such, but (as I consider that you are suggesting in the question) that does not mean that the notion (...
MDCCL's user avatar
  • 8,500
8 votes

When should a primary key be meaningful?

under what circumstances, if ever, is preferable to use a primary key with some other real meaning? (emphasis added) Given that the focus of this question is "preferable" and not "acceptable", and ...
Solomon Rutzky's user avatar
6 votes

What are the disadvantages of using surrogate keys?

There are many disadvantages to using surrogate keys, the most important ones IMHO are: Using natural keys significantly reduces the number of joins that your queries need to perform. With a ...
SQLRaptor's user avatar
  • 4,088
4 votes

Does the concept of candidate key exist only in theory?

I'll go out on a limb and guess you've done a course based on Elmasri and Navathe's textbook. This book is quite theoretical and isn't the clearest of prose, and it tends to use terminology that isn'...
ConcernedOfTunbridgeWells's user avatar
4 votes

What is the difference between a primary key and a superkey in a DBMS

From this stackoverflow.com answer of mine: A candidate key is a set of columns that uniquely identifies rows and that contains no smaller ("proper") subset of columns that uniquely ...
philipxy's user avatar
  • 774
3 votes

Simple and Composite Candidate Key and Nulls

It all gets a bit tricky because of three-valued logic. Comparing NULL to anything returns "unknown", not "same" or "different" but "unknown". This applies even ...
Michael Green's user avatar
2 votes

When should a primary key be meaningful?

My opinion is "almost never". If something has meaning, then there's the potential for change if reality ever diverges from the data, and then you have to deal with cascading updates in spite of the ...
db2's user avatar
  • 9,648
1 vote

What is the meaning of "minimal key"?

They are all minimal keys. Minimal means there is no proper subset with the same property.
ypercubeᵀᴹ's user avatar
1 vote

When should a primary key be meaningful?

All keys of a table identify rows in that table. DBMSs will enforce uniqueness constraints on keys (AKA candidate keys) which guarantees their uniqueness and thereby guarantees that rows are ...
nvogel's user avatar
  • 3,787

Only top scored, non community-wiki answers of a minimum length are eligible