Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suggestions for random candidate key generation methodol
Message
From
10/05/2004 12:08:45
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00902286
Message ID:
00902468
Views:
25
Hi, Gérald,

>I dont know the type of your SN, but if it's numeric, you can change it to character.
>Numeric is base 10 and chars is base 36 (if you use A-Z,0-9).
>
>For a 2 digit len field you have only 100 different SN (10*10) but if you use alpha you have 1296 SN (36*36)!!
>
>For a 7 digit field, numeric give you only 10 000 000 SN and Alpha is 78 364 164 096 SN (around 2 times the Bill Gates fortune, its a big number no?).

Thanks for your comments. It's always great to brainstorm.

The SN will be numeric, and while I think I could go as high as 8 digits, it won't be too long. Clerks will be typing in this number and the client wants it to be numeric since it'll be easier to type accurately. Also why they don't want it to be too long.

9,999,999 will actually be more than enough, but serial numbers could be reused over time. However, in practical facts it would take them 30K years to use up the numbers. I wanted to use 7 digits so I'd get a good range of randomness in the SNs.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform