Reply to 2 different foreign keys in one table

Your name:

Reply:


Posted by HandersonVA on 06/13/06 19:22

There is itemlookup table, which stores item number and item
description. Also there is a child table, pricehistory, of the
itemlookup table, which stores different prices and different date
ranges. So it is one-to-many relationship. (Price can be stored more
than one with a different date range)
And there is another table RequestItem that stores the foreign key of
the itemlookup table to show the information of the itemlookup table.
Then how do I know later which date range of the price was stored in
the RequestItem table? Since I only keep the foreign key of the
itemlookup table, it will be impossible to keep track of the row of the
pricehistory table if there are more than one data existed in the
pricehistory table.
Will it be a valid table structure to create a column for the foreign
key of the pricehistory in RequestItem table or any other ways to
handle this issue?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация