Forum OpenACS Q&A: Response to Using math with CONNECT BY

Collapse
Posted by Jade Rubick on
On further reflection, another possibility would be to figure out the carbohydrates whenever the mix is changed. Whenver a mix was changed, you'd have to change the carbohydrate levels of all everything based on it.

Alternatively, if you were using the Sql for Smarties example, then every time you changed a part's weight, you would change the weight of all parts that include that component part. You would then store the weight in each part, so you could query it quickly.

This seems like it would be much more efficient, but perhaps more liable to error. If seems more likely to end up with bad data, so perhaps you'd need to completely regenerate the weights (or carbohydrates) occasionally...