On Thu, 06 Jul 2000, Christopher Browne wrote:
> On 06 Jul 2000 09:10:23 EST, the world broke into rejoicing as
>
> Bill Gribble <[EMAIL PROTECTED]>  said:
> > Richard Wackerbarth <[EMAIL PROTECTED]> writes:
> > > I agree that rather than describing the properties of a currency for
> > > the "denominator" of an amount, we should simply reference the
> > > currency. The properties of it are common to all instances of amounts
> > > denominated in that currency. Further, that reference can be "factored"
> > > and we can simply store the numerator of each entry.
> >
> > Storing the two halves that make a value in completely different
> > layers of representation is wrong, IMO.  If a "monetary value" is a
> > single concept, it should be stored as a single entity.  To do
> > otherwise is just to ask for headache after headache.

> Ah, but storing the denominator, which is identical for all USD
> transactions, in each transaction, breaks normalization rules.
> So this more or less begs the question:
>   Which headache do you want?

> I'd rather go with the headache that diminishes storage requirements and
> likely increases speed, rather than one that requires that I replicate
> data, and gives the opportunity to replicate it _WRONG_.

Further, I will argue that, when speaking of "commodities", Bill's 
denominator is really a display scaling factor that he has misplaced.

Commodities are counted. That, by definition, means that they are represented 
by an integer. If you must use a rational, the denominator is always unity.

Remember that we count CENTS and not DOLLARS. The fact that you choose to 
represent a large sum of CENTS by the equivalent DOLLAR amount is an artifact 
of the display rather than anything intrinsic to the counting process.

And Bill has overlooked the fact that simply knowing the scaling factor is 
still not enough. He will still have to reference the currency for things 
like the currency symbol and other conventions about the display or to 
find/verify that the units are compatible.

Another problem is that the display scale may be less than unity.

In particular, consider bonds. One bond may have a face value of $5000 or 
$1000 or some other amount. The unit is the BOND, not the DOLLAR, or CENT. If 
I sell the smallest unit, I must sell a face value of $5000 (or whatever).
Now, just to keep things interesting, the practice is to display the bond 
holding in face-value dollars rather than physical binds. Thus, Bill's 
display denominator is 1/5000.

And we still have not discussed exchange rates. These clearly require TWO 
rather than ONE commodity. Further, when we compute a price from two 
commodity amounts, that tells you nothing about the "smallest unit". That 
information will have to be stored elsewhere.


--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to