Re: Need help to model a system
Posted by: Eus Kevin
Date: February 28, 2007 04:13AM

Mmm... the following schema should make it easy.

article_id → article_name
Article = {article_ID, article_name}

article_id, week → amount
Order = {article_ID, week, amount}

To update, for example, just issue:
UPDATE Order
SET amount = "5"
WHERE article_ID = "112233" AND week = "3";

To query, for example, just issue:
SELECT Article.article_ID, article_name, week, amount
FROM Article INNER JOIN Order USING (article_ID);

Options: ReplyQuote


Subject
Written By
Posted
February 27, 2007 04:40PM
Re: Need help to model a system
February 28, 2007 04:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.