0
$\begingroup$

From a database theory point of view, what term can be used to refer to a key that does not violate the rules of the engine within which it is implemented, but fails to conform to any sort of normalisation? For instance, if a timestamp was used as a primary key. Primary keys are supposed to ensure that no two rows refer to the same thing, but as long as the values within the so-called primary key column is unique, the database engine may not detect any violation.

The reason for wanting to obtain a technical or academic term for this is to describe a situation where there is a primary key that has been technically successfully implemented, but is conceptually flawed.

$\endgroup$
  • $\begingroup$ It might be the surrogate key, which without pushing too hard does not violate the normal forms, but it is conceptually flawed. Looking at NFs it is quite hard to blantly violate them by primary key. $\endgroup$ – Evil Sep 22 '16 at 22:14
  • $\begingroup$ The database is not built to detect a violation. There is not actual requirement normal form. I would say a the table (or database) does not satisfy 3NF. $\endgroup$ – paparazzo Feb 8 '17 at 22:04
  • $\begingroup$ I think entity integrity is a candidate. OTOH, I don't see what's wrong with using a timestamp as a primary key. If your database table is used to store logs, the timestamp is actually a quite natural choice of primary key. $\endgroup$ – gardenhead Aug 8 '17 at 1:47
  • 1
    $\begingroup$ Primary keys are expected to meet certain design criteria, but I've never seen a specific term to describe this. $\endgroup$ – reinierpost Aug 8 '17 at 8:15
2
$\begingroup$

For instance, if a timestamp was used as a primary key. Primary keys are supposed to ensure that no two rows refer to the same thing, but as long as the values within the so-called primary key column is unique, the database engine may not detect any violation.

For this example I would simply state that the problem is that the uniqueness of values of timestamps, if it happens to hold, is only accidental: there is generally no fundamental reason that the same timestamp (even with very high precision) could not be assigned to 2 separate records.

For a primary key uniqueness should not be accidental but fundamental.

$\endgroup$
0
$\begingroup$

Varchar2 is a datatype to store attributes of type character.

Timestamp is a datatype to store attributes of type "Date and time".

If this attribute (of type "data and time") is being used to uniquely identify a tuple, then it is called a primary key.

Also, Anything which is unique for each tuple(row) and which can be used to uniquely identify it, is called a primary key.

There is no need of any new terminology.

$\endgroup$
  • 4
    $\begingroup$ Your answer is not relevant to the asked question. $\endgroup$ – Devendra Bhave May 10 '17 at 4:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.