Hi, 

yes, looks like too much :)
I would go with the float representation... for the conversion, I do not have 
an experience or opinion about performance or db footprint. 

You have to check that in the old empirical fashion way :)

Esteban

On Aug 19, 2013, at 10:38 AM, Sabine Knöfel <sabine.knoe...@gmail.com> wrote:

> Hi,
> 
> I am interested in your opinion.
> I use FixedDecimal for computing currency amounts.
> This works fine.
> 
> When storing the amounts with voyage into mongo (I have a lot of them!!!),
> normally, one currency amount would be stored into mongo as follows:
> 
>           "vatAmountEUR": {
>             "#instanceOf": "FixedDecimal",
>             "negative": false,
>             "number": NumberInt(90280),
>             "part1": NumberInt(9),
>             "part2": NumberInt(280),
>             "scale": NumberInt(4) 
>          } 
> 
> I think, this is a lot of stuff for one single value. I tend to convert the
> FixedDecimal into a Float for storing it. In this case, it would be like
> this:
> 
> "vatAmountEUR": 0.7196 
> 
> When loading, I immediately re-convert it into a FixedDecimal. I would do NO
> computing with the float(!!).
> 
> What is your opinion about this (rounding issues, performance, database size
> etc.)?
> Do you think, there is something against it? What would you do?
> 
> Sabine
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-tp4704104.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 


Reply via email to