money datatype

  • we have an online payment application

    Example: A customer in India pays in Rupees on one transaction,another customer in the US pays in Dollers.

    For CLOUD implemented databases where a server can exist anywhere in the

    world, and transactions can come in from anywhere, can the database be set up

    to store money in currencies specific to each transaction?

  • It would depend on the structure of your database.

    I would like to hope that alongside your stored customer information you have the currency of the customer (and therefore a currency table with exchange rates).

    Your order will have a customer identifier, from which you can establish which currency that transactions are in. You can therefore, with your currency table convert to any currency you like and provide reports on this too.

    Very high overview - hope it helps

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • A value is nothing more then that; just a value. This is also applicable to currency. Every amount in currency just represents a decimal value independent of the currency.

    Your application needs to handle the difference in currency and the applied rate between the currencies. The value needs to be converted to and stored in one single currency within the database. There is not a generic datatype for different currency (like the DATETIMEOFFSET is available to store datetimes across the world)

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply