var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I need to develop some tables in SQL server to store formulas. These formulas can be of varying complexity. Some might take the form:
1 + 2 (ordinal1, ordinal2, operator '+')
Others might take a more involved form:
(calculation_from_a_field_in_another_table, random_ordinal, +) / (34 *2)
And so on and so forth.
The key point is that formulas can contain 1...n expressions and also a given term may be an ordinal that the user inputs, or it could be a reference to a pre-existing calculated value.
I thought of:
But you could end up with something hideously recursive.
I would appreciate hearing from anyone who has modelled this sort of thing in their database and how best to do it from the point of view of retrieving the information quickly and efficiently.
You will have to go for the hideously recursive option.
My only suggestion is to add a "nesting level" attribute.