title: Column calculation based on formula from another Table
body: <p>For example, suppose we have a table, which contains id of a formula and a formula itself. Second table would have id of a value and values themselves, which are to be used in the formulas.</p>
  <p>So, there is a table, which connects formulas and values, like a template of a formula. For example, result of formula #1 is to be calculated from values #5, #16 and #228.</p>
  <p>The thing is: each formula uses different values and different number of them and in different ways, BUT the same value can be used in different formulas. For example, formula #1 is calculated as #228 - #16 * #5, yet formula #2 is calculated as #16 * #228 + #356.</p>
  <p>Which begs the question, is there a way to make a caluculated column based on a select statement and a predefined formula? Formulas will be written in the database by hand, not generated, so a formula can be based on value IDS.</p>
  <p>I haven't yet chosen a DB engine for my project, as I am curious is there any engine which supports this kind of stuff at all?</p>
  <p>I know a little something-something in the database world, yet I'm lacking expertise, so I would like to ask the more experienced programmers in this field.</p>