jwwceo Posted August 27, 2006 Share Posted August 27, 2006 Hello,I am designing a database, my first one, for a t-shirt website. I have tables for the individual t-shirts, as well as a linked table for all the colors the shirts come in. They share a "color_id" field that is in both tables. My question is: what do I do if some of the shirts come in more than one color? How can I design a databse that allows for shirts to have multiple options from the same table???Any help would be awesome...James Link to comment https://forums.phpfreaks.com/topic/18768-databse-design-question/ Share on other sites More sharing options...
fenway Posted August 28, 2006 Share Posted August 28, 2006 You need 3 tables -- shirts, colours, and shirt_colours. The latter is simply a list of pairings -- you can have as many combinations as you wish. Link to comment https://forums.phpfreaks.com/topic/18768-databse-design-question/#findComment-81869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.