Decimal() instead of float?

Steve Holden steve at holdenweb.com
Thu Nov 16 05:37:02 EST 2006


Terry Reedy wrote:
> "John Salerno" <johnjsal at NOSPAMgmail.com> wrote in message 
> news:455b82a0$0$7054$c3e8da3 at news.astraweb.com...
>> John Machin wrote:
>>
>>> Here in Austraila, (I expect this is common to most countries), there
>>> are people who are utterly clueless about elementary data model rules,
>>> like identification "numbers" should be kept as strings.
>> Do you mean that ID numbers that serve as a primary key in a database
>> should also be strings?
> 
> If you mean user-entered data like social security, phone, account, part, 
> or postal code 'numbers' -- as opposed to internal db-generated numbers 
> that the user never sees -- this I would presume 'yes'.
> 
The modern trend is to use such values as alternate keys, and to have 
all tables use an automatically-allocated integer (autoincrement, 
identity, sequence) field as the primary key.

Unfortunately some applications are getting such large tables that a 
32-bit field is insufficient to enumerate all existing and deleted rows. 
Then you have to start keeping tables of unused primary keys.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list