User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 426,249 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,105 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums

Data model for storing boolean expressions

Join Date: Mar 2008
Posts: 36
Reputation: LeBurt is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
LeBurt LeBurt is offline Offline
Light Poster

Data model for storing boolean expressions

  #1  
Mar 6th, 2008
Hi all,

(this is a repost from here)

I'm working on a relational data model in which I'd like to store boolean expressions. I'm a little rusty so I'm humbly asking for a little push.

For example, let's say I have the following boolean expression:

((A = 8 OR A >= 9) AND B < 3) OR NOT (A <> 8 AND B = 0)

What would be a simple, elegant data model to store this kind (or any kind) of expression? Also important, how would you query the database in order to rebuild the logical expression from the stored data?

BTW, any kind of help would be appreciated. Reference to books, papers, web sites are perfectly ok.

Hey, thanks!
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 8:52 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC