Take the 2-minute tour ×

Database Schema

Dears, Please click on the link above to see the image of the database schema that i need help with today.

The scenario is that we have Product categories (wmu_pns_categories) and Products (wmu_pns_prods). Similarly, we have clients(wmu_clients) and products that a client has purchased (wmu_prods_to_clients). Now the issue is that the each product has variable attributes. If there are two products (P1 and P2), each product will have different attributes attached to it. When i started searching about adding fields on fly, i came across Entity Attribute Value Model and came up with the schema as shown in the attached images.

Now the issue is that , if my schema is alright or not? Moroever, is there any better way to do what i wanted to achieve? Please suggest.

To elaborate more, wmu_ns_prods_attributes is the table that will contain attributes per product. It will also be used to create forms on the website using PHP. Each attribute value per product that is taken by a specific client is stored in the table wmu_prods_attrs_values_to_clients.

Any help would be highly appreciated.



share|improve this question
Can anyone help me out here please? –  user2052125 Feb 28 '13 at 7:18
In all but incredibly limited situations, you should not be using a relational database as a key-value store. Put the product attributes on the product table. If it's sparse, so what - nulls are cheap to store in most DBMS'. –  N West Mar 7 '13 at 14:39
add comment


Your Answer



Browse other questions tagged or ask your own question.