Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary keys useless?
Message
De
04/09/1997 10:00:37
Biju Varghese
M.H Alshaya Co W.L.L
Kuwait, Kuwait
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00047863
Message ID:
00048481
Vues:
28
Thanks Jim, The info u provided as really usefull. I'll tink about making my surrogate PK's as integer data type. Wow! 10 records every sec for 68 years!!! By the time it runs out of code, may be my son will rewrite it :)) Thanks a lot for the info... Biju > Biju, > > The Integer data type is a four byte singed binary number with a range of; > > -2,147,483,647 to +2,147,483,646 > > If you make your PK an integer you can just give any new record the next > number. If you restrict the values to positive only you get 2,147,483,646 > unique positive numbers. If you start the sequence at -2,147,483,647 then > you get over 4,000,000,000 unique values. > > Integers need no conversion so you save on the time it takes to build your > base 36 numbering system. > > Keep in mind though, that if you use only positive numbers then you may run > out of ids. If the system has 10 records added every second 24 hours a day > it would only work for 24,855 days or approximately 68 years before it ran > out of new values.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform