Jump to content

Archived

This topic is now archived and is closed to further replies.

jwwceo

Databse design question....

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.