Created
May 26, 2021 08:30
-
-
Save rezuankassim/d5524fe718620285748587a1e27521f6 to your computer and use it in GitHub Desktop.
G2G
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In ERD shown that the table is for storing currencies when then currencies is not available in the database | |
To minimize the call for the currencies, I have just call `USD_MYR` and `USD_EURO` because and I can get the inverse of | |
the currency rate by ` 1 / currency_rate `. Therefore I would get the inverse by just using one free API from the | |
currency API. | |
When I have check the database do not have the currency that I need, I will call the API and store the rates with the inverse | |
of the rates into the database. Whenever user click calculate, I will check whether the database got the rates, if not will | |
call the API. | |
I would make a cronjob to clear the rate everyday to make sure that the rates is always updated everyday. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment