Storing conditional logic expressions/rules in a database

前端 未结 5 751
说谎
说谎 2021-02-05 17:13

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

5条回答
  •  遇见更好的自我
    2021-02-05 17:38

    How about something like this:

    Tables:
     tags( id, name )
     goods ( id, ... )
     goods_tags_mm ( tag_id, good_id )
     rules ( id, name )
     rules_cnf ( id, rule_id )
     rules_cnf_terms ( rules_cnf_id, tag_id )
    

提交回复
热议问题