With the example you posted above, what you're doing is essentially storing possible attribute combinations, which ultimately makes the data less flexible and results in having to store more data. As I mentioned earlier, if you had a product which a lot of customisable attributes (for example, a car - which may include wheels, colour, engine, interior, etc), you could potentially have 1000's of possible combinations, all of which would have to be stored in the database.
Let me demonstrate. Let's say we have a single product (T-Shirt) which has a size attribute, which consists of the values: small ($19), medium ($20), and large ($21). Let's also say we have a material attribute which consists of the values: polyester, cotton (an extra $2), satin (as extra $4). Let me first demonstrate how this would look in my proposed schema (a schema that doesn't store possible combinations)...
Code:
ID Title Base_Price
-- ----- ----------
45 T-Shirt $19
ID Product_ID Attribute Value Price_Diff Order
-- ---------- --------- ----- ---------- -----
387 45 size small 0
388 45 size medium +$1 1
389 45 size Large +$2 2
390 45 material Polyster 0
391 45 material Cotton +$2 1
391 45 material Satin +$4 2
Two tables, 7 rows total, easily understood by humans at a glance (which is always a bonus) and complete flexibility over how the data can be displayed (and as I've proven, with the help of r937, the database schema can affect the format in which data can be displayed).
Now let's look at how the same thing is achieved in your schema (a schema that stores possible combinations - and that also stores each attribute value which makes up those combinations as a separate row - that's the number of combinations multiplied by the number of attributes)...
Code:
ID Title Price
-- ----- -----
1 Shirt $19
2 Shirt $20
3 Shirt $21
4 Shirt $21
5 Shirt $22
6 Shirt $23
7 Shirt $23
8 Shirt $24
9 Shirt $25
ID Attribute Value
-- --------- -----
1 size Small
2 size Medium
3 size Large
4 material Polyster
5 material Cotton
6 material Satin
Product_ID Attribute_ID
---------- ------------
1 1
1 4
2 2
2 4
3 3
3 4
4 1
4 5
5 2
5 5
6 1
6 6
7 3
7 5
8 2
8 6
9 3
9 6
You can't tell me that schema is suitable for storing products with any more than 1 price-altering attribute. Notice how I needed 18 rows in the products2attributes tables (the number of combinations (9) * the number of attributes (2)). Also notice how I needed to add what appears to be duplicate products (same title, same price, but different ID).
I'm not saying your schema doesn't serve a purpose, it's just it's not a practical solution when you need to store multiple attributes with multiple price-altering values per attribute. A schema like yours used in such an application as this, would also be very slow.
Bookmarks