Jump to content

How to design a simple T-shirt product database table.


theITvideos

Recommended Posts

Hi there.

 

I am creating an e-commerce website, in which the Supplier will have the option when listing his product i.e. a T-shirt listing.

 

The Supplier will have the option for specifying the QTY of a particular T-shirt available in size and color in his stock. For Example:

 

T-Shirt Variation        :      Qty

Small - RED              :        8

Medium - RED          :        5

Large - RED              :        7

 

Small - BLUE            :        4

Medium - BLUE          :        6

Large - BLUE            :        2

 

Small - GREEN          :        5

Medium - GREEN        :        3

Large - GREEN          :        6

 

Now I have a Product table that has the product details and I would like to know how I can design this table to hold these values.

 

Shall I create a Product table and then a Product_Variation table? and have some Foreign Key relationship? maybe One-to-One or Many-to-Many?

 

Kindly advice how I can design my database to hold this data.

 

Any comment/feedback is always welcome!

 

Best regards.

 

Thank you! :)

Archived

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

×
×
  • Create New...

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.