Primary key of two fields

  • Thread starter Thread starter Duane Hookom
  • Start date Start date
D

Duane Hookom

I always add an autonumber and use it as the primary key. You can create
unique indexes on any other field(s) as required.
 
Thankes duane

I know that it is possible. The question is - does it's smart to do it like
this?
 
I know that it is possible. The question is - does it's smart to do it
like this?
Not sure if this is a trawl, but I'll bite anyway.

There is a long and well respected tradition on these NGs of agreeing to
differ on Natural Keys vs Artificial Keys.

In R theory, there is no problem with cascading natural keys down long
chains of relationships, and there are good reasons why it's a good idea.

When it comes to actually implementing code and forms, then there is a
significant payoff in putting artificial keys everywhere; but bear in mind
that joins between (say) grandfather and child tables are much more complex
and slower than they need to be. In other words, it's swings and
roundabouts and you need to analyse your own requirements.

One thing that worries me about your design, though, is what happens if
there are more than twenty-six revisions of a document? And saying that's
not likely to happen is not an answer!

All the best


Tim F
 
Hello there

I have an agreement table.

The primary key is based on two fields: Numerator - id of the deal,
Alfanumerator, present the change order of the agreement: if the user enter
new agreement he will get id of new mumber with the letter A.

when the user change the old deal the number don't changed but the letter is
forwarding to B..C ect...

Any table related to this table has the same structure of primary key. Is it
smart to do it like this?
 
Back
Top