H
H
Hello America2014-04-23 18:28:07
Database design
Hello America, 2014-04-23 18:28:07

How to make a table of exchange rates?

Here, for example, a dollar costs some euros, some rubles, but what is the dollar valued against?
So I need to make a table of currencies, how can I make that single constant, against which I will calculate all currencies? 6928ffa646fa4bc296c66c3b552c792b.png
Or should I take this information from the CBR website?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hOtRush, 2014-04-23
@hOtRush

It is quite logical that the exchange rate is the ratio of one currency to another. so what does it mean against what the dollar is valued? What you evaluate is what you evaluate.
in base it is possible to store the most banal relation
1 | USD | 35 |
I don’t think it will be a lot of work to calculate RUR )
10 rubles = (10 * 1) / 35
10 dollars = (10 * 35) / 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question