Re: Database design issue



shaji.cc@xxxxxxxxx wrote:

A report has to be generated for this table. Catch is that, who ever is generating the report wants to see the amount in his own currency (otherwise he cant total the amount). So at the time of report generation, for each row, it has to calculate the FX rates for that amount. This creates huge performance problem.


Introducing 2 or 3 columns more and storing amounts in diffrent currencies was the first idea came to my mind. But this doesnt scale well.


That's obviously a baaaaad idea.

I don't see why having to do the conversion on the fly is such a big performance issue. I wouldn't expect more than say a couple of hundred entries in the Currency conversion table which you could read into a memory cache at the start of your report - unlikely to take you more than say 10 to 20 msecs with any decent database - and performing the conversion using an in-memory table will probably cost you very very little in terms of time.

On the other hand, if you're trying to read the conversion table from the database for every user record, THAT may be an issue. Each database access costs time - so you'd certainly want to avoid that if your number of user records is large.

BK

.



Relevant Pages

  • Re: How do I sum an IIF function in an Access Report?
    ... I did not store a currency name as a field ... One for the EUR conversion, ... > together to show my results in a query for each of my 600 records. ... >>> Amount in EUR ...
    (microsoft.public.access.reports)
  • Beginner - Structs, Namespaces, Pointers
    ... I'm trying to create a currency converter in C++ but it won't compile. ... conversion and returns the value. ... int main{ ... // create storage to hold conversions to and from and also the amount ...
    (alt.comp.lang.learn.c-cpp)
  • Dollar declines on plans to ditch dollar-oil price
    ... LONDON -- The dollar fell on Tuesday, hit by a media report that Gulf ... The report was denied by Kuwait, but the European single currency rose ... The Australian dollar jumped after the Reserve Bank of Australia ...
    (talk.politics.misc)
  • Dollar declines on plans to ditch dollar-oil price
    ... LONDON -- The dollar fell on Tuesday, hit by a media report that Gulf ... The report was denied by Kuwait, but the European single currency rose ... The Australian dollar jumped after the Reserve Bank of Australia ...
    (sci.military.naval)
  • Dollar declines on plans to ditch dollar-oil price
    ... LONDON -- The dollar fell on Tuesday, hit by a media report that Gulf ... The report was denied by Kuwait, but the European single currency rose ... The Australian dollar jumped after the Reserve Bank of Australia ...
    (soc.culture.pakistan.politics)