[thelist] sql/table design help

Tom Dell'Aringa pixelmech at yahoo.com
Wed Nov 20 22:04:01 CST 2002


Yes, me again with more questions on sql and my table design. Here's
the trouble: I have a table that has items. These items sometimes
have more than one size, therefore more than one price. When I list
them, I only want to list the item once, and then all the prices.

Right now I have a item table like this:

+--------+------+-------+
| itemID | item | price |
+--------+------+-------+

So first question: It seems then I will have a one to many
relationship so I should break out the price into another table,
probably an intersection table? Like thus

itemID | priceID

Is this the best way? 2nd q: how to i write the query to get the item
name once, but all the prices? Not sure where to start with that
one...

TOm

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list