Jump to content

Database design, products with different colors


NikkiLoveGod

Recommended Posts

Hi!

 

I was wondering how should I design my database and how to collect info from there in a right way.

 

So I have few products, lets say I have Tiles Y, and there is yellow tile Y, blue yellow tile Y and so on, then there is Tiles X, and there is green tile X, pink tile X. How should I design my database to hold this information?

 

And I need to be able to list all of these products as a single product, like separate colors from each others, and then in another view, I have to combine Tile Y's colors, to show just one product.

 

I am thinkin of putting it into a single product table, where you have the Name, ID, and Color there. And then you would somehow loop through it by doing "loop products and show each as its own product" and then you would have another loop on another view, where you would do "loop products, combine colors into one product".

 

Any pointers? And how would I go about getting and combining the data like that? Thanks alot!

 

Hope you guys dont start to feel like I am making you design my work, I just need one "best practice" and I can come up solutions by that on my own. hehe.

 

-NikkiLoveGod

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.