I am using MySQL and have an articles table which has 2 columns: currency and price, but an article can also have a negotiated price, so I can’t determine currency and price values.
What should I do to be able to have defined and negotiated prices?
If the negotiated price is specific to a user/business… , then this is probably a one to many relationship, you will need a tuple table to hold the price and link the article to the other object.
e.g:
(I’ll assume the price is negotiated with a user)
You then simply need to
LEFT JOINto this table and useNVL(user_article_price.price, article.price)to get the overridden value.
Note: It is probably a good idea to make a compound primary key using the 2 id columns to stop duplicate values.