![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Autonum fields for generating primary keys are limited to 2^32 (10^10) keys. It is my understanding that they are not reused. What happens when the last key is generated and then an attempt it made to add another record? |
#3
| |||
| |||
|
|
Autonum fields for generating primary keys are limited to 2^32 (10^10) keys. It is my understanding that they are not reused. What happens when the last key is generated and then an attempt it made to add another record? If the field is limited to 2^32, it may fail to accept a new record after (2^31)-1. |
#4
| |||
| |||
|
|
If a table has a very large number of records added and then deleted, eventually, the autonum field will count up to the limit for that data type. Will the next record add request get an error even though the table is almost empty? |

#5
| |||
| |||
|
|
Autonum fields [sic] for generating primary keys are limited to 2^32 (10^10) keys. It is my understanding that they are not reused. What happens when the last key is generated and then an attempt it made to add another record [sic]? |
#6
| |||
| |||
|
|
You might want to consider a proper primary key in a logical data model instead of a physical counter of events in the hardware. This is favourite theme of yours and nobody would argue against your |
#7
| |||
| |||
|
|
Autonum fields [sic] for generating primary keys are limited to 2^32 (10^10) keys. It is my understanding that they are not reused. What happens when the last key is generated and then an attempt it made to add another record [sic]? That depends on your product and what release you have. Some do a roll-over to negative numbers, some give you an overflow error and some can re-set. But a better question is what can the internal state of the hardware mean in a correct logical data model? The answer, of course, is nothing at all. It is a totally non-relational, highly proprietary construct from assorted vendors. You don't even know the differences between columns and field, rows and records, so it is pretty sage bet that what you are doing is mimicking a 1950's sequential magnetic tape file system in you SQL product. You might want to consider a proper primary key in a logical data model instead of a physical counter of events in the hardware. |
#8
| |||
| |||
|
|
--CELKO-- <jcelko... (AT) earthlink (DOT) net> wrote: You might want to consider a proper primary key in a logical data model instead of a physical counter of events in the hardware. This is favourite theme of yours and nobody would argue against your preference. What key do you suggest people use when there is no "proper primary key"? For example, there was once a proper primary key of Order Number that was printed on the order form. The order is now entered directly into the supplier's computer, possibly by the customer's computers. Can you provide a proper primary key that is superior to a computer generated one? |
#9
| |||
| |||
|
|
On Jul 29, 12:59 pm, David Segall <da... (AT) address (DOT) invalid> wrote: --CELKO-- <jcelko... (AT) earthlink (DOT) net> wrote: You might want to consider a proper primary key in a logical data model instead of a physical counter of events in the hardware. This is favourite theme of yours and nobody would argue against your preference. What key do you suggest people use when there is no "proper primary key"? For example, there was once a proper primary key of Order Number that was printed on the order form. The order is now entered directly into the supplier's computer, possibly by the customer's computers. Can you provide a proper primary key that is superior to a computer generated one? Order Number is a valid PK. Think of the paper based system. Each page or the Order pad is numbered and auditors validate using the sequential nature of that number. Similarly your checking account uses sequential check numbers. I'm not sure whether you are agreeing or disagreeing with use of a |
|
However, most things in this universe do not come with ID numbers. Humans long ago invented names to identify things. So in a table of family menbers you might have used name for the primary key. If you think about most entities, you can come up with a way to form a key that is not a numeric ID. There are some cases where ID's work better (Work Orders or Checks for example), but even those you could come up with a valid candidate key other than the number. (go on, try it!) The Socratic method is useful for teaching but a handicap when arguing |
|
Are you arguing that the Person and Address tables are good cases of using an ID column? I would argue that they are not such cases. I recently chose a computer generated key for the members of my tennis |
#10
| |||
| |||
|
|
I am arguing that the question is exactly equivalent to asking what happens when the numbering machine that prints the cheque numbers overflows. |
![]() |
| Thread Tools | |
| Display Modes | |
| |