How can I store logical expressions using a RDBMS?
I tag objects and would like to be able to build truth statements based on those tags. (These might be considered as virtual tags.)
Tags
new
for_sale
used
offer
Rules
second_hand_goods = (!new or used) and for_sale
new_offer = new and offer
second_hand_offer = second_hand_goods and offer
- Rules should be able to reference both tags and other rules.
- Schemas that can be easily accessed by hibernate would be preferrable.
- Preferably it will be possible to retrieve the entire rule in one select/call.
The rules are not for use internally by the database but are created and used by an external application that needs to persist these tags and rules.