Storing dynamic attribute data in a db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This is now my 3rd attempt at writing this email. :) The first two were
pretty long...
 
I'm currently working on trying to find a solution that is both simple
and flexible for storing the data of a complicated set of dynamic
options for some of our products. My current thinking is that I will use
Modified Preorder Tree Traversal to organize the data. Each record will
have the following:
 
id (auto-number)
sku (related product's sku)
lft (hierarchy data)
rgt (hierarchy data)
attribute (like: Size, Color, Style)
option (like: Blue, Large, Plain)
pricemodifier (-$20, +$20)

This kind of data is not difficult to handle if every combination that
is available through the different options is actually available from
the manufacturer. However, some combinations are not possible so the
data needs to represent itself that way. For example, all t-shirts come
in Red, Green, or Blue but only Green shirts come in Large. All other
colors have only Small and Medium.

Is there a standard way to handle this kind of thing if not, how would
you handle it?

(On a side note, when the solution is found, could it be called a
"pattern"?)



Thanks,
Chris.

p.s. Yes this is the short email.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux