Storing item currencies in SQLite database

I'm building out a schema for a site that will need to store a product's currency. I'm not sure whether I'll be needing to be able to convert from one currency to another, however, I'm presuming that will probably be necessary. My db schema is below. (this is for a mobile app btw). My question is, should I just simplify things by adding an additional column called currency to my item table? Does my design make sense? Thank you.

Edit (based on reply from Victor below): the items have a many-to-many relationship with order table. How about putting the currency id on order table since most likely all items in an order will be in the same currency?

exchange_rates

  1. id
  2. currency_from
  3. currency_to
  4. ex_rate

item_currencies

  1. currency_id
  2. item_id (from items/products table)

currencies

  1. id
  2. code
  3. symbol

Answers


The schema looks good but I think that the *item_currencies* table is not necessary.

In your items table you can just add the currency_id column. Keep it together with all the item properties :)


Need Your Help

How do I scale my Azure application without having a temporary outage?

windows api azure azure-web-roles

I'm toying with Windows Azure Management API for scaling my Azure web role. At some point I have one instance and decide that I want to go from one instance to two instances. I send an HTTP POSt re...

Google App Engine Geohashing

google-app-engine map geolocation geocoding geohashing

I am writing a web application using GWT and App Engine. My application will need to post and query items based on their latitude, longitude.