MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » February 2013

Re: how to retrieve records and make sure they arrive in RRN sequence



fixed

James,

Quite bold of you on that:
<snip>
I would have (1) required that, at the very least, any
database file created without an explicit primary key be automatically
given an implicit one that would (whether a serial number...) make sure
individual records are uniquely addressable,
</snip>
I don't have a problem with this. I just didn't expect this from you.
Bravo!

On high speed systems timestamps may not guarantee uniqueness.

The only problem with sequences is eventually they need to be reset. In
theory you could have
memo#: 10765
rrn: 9999
sequence: 9999

memo#: 10765
rrn: 10000
sequence: 0001
Then again, if sequence 1 already existed, would it bomb?

granted, the sequence is a lot more than four digits. Just trying to make
my point. Even if you did enforce a default primary key the design might
be better served by a specified primary key of memo# and memosequence#
where each memosequence# starts with 1 for each new memo#. Then again,
screw the memo sequence# and just use a variable length character field
for the memo.

Rob Berendt





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact