Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You might want to take a look at this <a href="https://stackoverflow.com/questions/2951872/how-can-i-design-a-db-where-the-user-can-define-the-fields-and-types-of-a-detail/2952354#2952354">question/answer</a> in order to figure out if that's the way you really want to go... I'm not so sure.</p> <p>The real issue is that you have highly related and very different components. However, they do share properties in common... </p> <p>So, let's say you have a ProductProperties table that looks something like</p> <pre><code>ProductId PropertyTypeId PropertyId Value </code></pre> <p>The products table should be something like:</p> <pre><code>ProductId ProductCategoryId Name etc... </code></pre> <p>Assuming product 1 is a processor with a 1366 pin out, and product 2 is a motherboard with a 1366 socket, then each would have a Property of the "Socket" type with a value of 1366. This would make it extremely easy to query for. By querying the ProductProperties table (joining on Products), just exclude the ProductCategory of the item they are currently looking at to find products in other categories that work... Or, if you know the category ahead of time (like motherboards) you just select that way.</p> <p>You could go a little further on the admin side by defining Product Templates which automatically brought in the PropertyTypes at the time you are adding a new product. They would simply select the template, fill in the values and save..</p> <p>As a side note, I'm glad to know someone is working on a cart like this. I love <a href="http://www.newegg.com" rel="nofollow noreferrer">newegg</a>, but one thing I've felt they've always missed on is being able to link things like which processors will work with which motherboards.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload