Datamodel for expression tree

  • Hi All,

    I came across an interesting problem and struggling to find a solution to it.

    Problem Statement:

    I need to save the following expression in the db & retrieve it back.

    exp1 AND [ (exp2 or exp3) and (exp4 or exp5)] and exp6

    (this is a expression tree, a special case of binary tree)

    here, exp1, exp2... exp6 are the rows in expressionelement table in db. Now, how do i store this expression in the DB? how do I define the relationship b/w exp1 & exp2 with respect to the operator as a datamodel?

    Please let me know your thoughts..

    Thanks

  • Anybody?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply