Decimal() instead of float?

Steve Holden steve at
Thu Nov 16 11:37:02 CET 2006

Terry Reedy wrote:
> "John Salerno" <johnjsal at> wrote in message 
> news:455b82a0$0$7054$c3e8da3 at
>> 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.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list