Tutte storielle... i presupposti per una chiave primaria sono i seguenti... e non me la sono inventata io. La miglior chiave primaria "deve" rispondere di NO ai seguenti quesiti
Condition: Best Answer is NO.
codice:
Not Null: Will the candidate value ever be null? no
Brevity: Is the candidate value more than a single column? no
Simplicity: Does the candidate value contain embedded spaces,
special characters, or differential capitalization? no
Data Type: Is the candidate value something other than a number
or fixed-length character data type? no
Nonidentifying Value: Does the candidate value contain any
intelligence or have any meaning? no
Never Change: Is the candidate value likely to change? no
Solo un campo numerico risponde NO a tutti i quesiti. Qualunque altra cosa e' fattibile. Ma non sara' mai il meglio.
Poi ognuno attacca il carro dove gli pare. Purche' sia felice e giocondo.