Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Best Number Representation for Money

Re: Best Number Representation for Money

From: HansF <Fuzzy.Greybeard_at_gmail.com>
Date: Sat, 22 Jul 2006 13:14:17 GMT
Message-Id: <pan.2006.07.22.13.16.22.631065@gmail.com>


On Fri, 21 Jul 2006 14:57:07 -0700, blyons3 wrote:

> Hello all,
>
> Is there any convention for representing money with an Oracle Database?
> I'll throw out NUMBER(4, 19) as an ice breaker to get the conversation
> started.
>

As far as I can tell, anyone using 'Money' needs to have several pieces of information:

As a number, a number quantity is useless without additional context. Money, by itself, means absolutely nothing unless you know (at least) the date and the locality for which the money is relevant. Otherwise it is simply a funny formatted string that usually consists mainly of numbers.

For example, if I tell you I will give you twenty-four dollars, the questions you should be asking immediately are: "when?" and "which country's dollars?". The answer to these questions could be implied in some cases - for example, in reference to a specific transaction - but the implication is not guaranteed to exist in all cases.

Context includes, at the very least, the units or currency. But I suspect it may include additional information.

The effective date is needed to provide NPV or additional conversion information.

The added information could easily default to 'local currency', and 'date entered'. Not including the additional information would be the typically short-sighted design for which our industry is so famous.

Therefore, I conclude any decent 'money' datatype definition, to be truly useful and universal, needs to be a composite attribute.

Oh yes ... the implied question by the OP is "what number format should be used?". The answer is simple ... it depends on the context.

-- 
Hans Forbrich   (mailto: Fuzzy.GreyBeard_at_gmail.com)   
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.
Received on Sat Jul 22 2006 - 08:14:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US