Subject RE: [ib-support] Re: Numeric, Decimal, Double Precision and Float data types. What and when to use?
Author Wilson, Fred
Just as a note, maybe interesting to someone. We (Bell & Howell) use integer
for all measurement AND things that you count. We're cater to the mailing
business, and things like envelope weight and postage amount, are all stored
as ints. This eliminates all rounding errors. We have other tables, business
rules tables, in the database that defines the units for these items.
Example, here in the US, the postage is in $0.001 (tenths of a cent), but it
still just stored as a integer). A number of tens of a cent. It's up to the
client to determine the unit and do with it as it sees fit. The weight, here
in the US, is tenths of an ounce. In Europe, it may be grams, or tenths of a
gram or whatever. We been very successful using this method, and we never
run into rounding areas with any of the items, monetary, or otherwise. We
never worry about the datatype of any of these measurement or countable
columns. The client simply determines the unit type via the business rule
for the particular value, and bingo, there you have it ;)

Best regards,
Fred Wilson
SE, Bell & Howell

-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Thursday, July 11, 2002 5:48 AM
Subject: Re: [ib-support] Re: Numeric, Decimal, Double Precision and
Float data types. What and when to use?

At 06:34 PM 10-07-02 +0300, Theo Bebekis wrote:

>My question was primarily about Numeric/Decimal and IEEE types
>and what and when to use.
>What do you experienced IB/FB programmers recommend me to use?
>Numeric/Decimal or IEEE?
>Does it depends? On what?

Use Ann's dictum and you won't go far wrong:
"Use float types for things you measure and numerics for things you count."

So it's definitely numerics for money, elapsed time, beans...and floats for
distances, weights, body girth, heights of buildings, length of a piece of

---"Never hire a dyslexic removalist"

All for Open and Open for All
Firebird Open SQL Database · ·

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to