theITvideos Posted August 16, 2010 Share Posted August 16, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/210845-how-to-design-a-simple-t-shirt-product-database-table/ Share on other sites More sharing options...
fenway Posted August 17, 2010 Share Posted August 17, 2010 The more you separate the tables, the more flexible your design. Quote Link to comment https://forums.phpfreaks.com/topic/210845-how-to-design-a-simple-t-shirt-product-database-table/#findComment-1100348 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.