I have question related to business rules. Let's have a entity Account with some properties (amount, name, type etc.) on which we define business rules.
I store my rules in database table as follows
Rule_id | Field | Operator | value .
Rule can be like , amount > 1000, name ="abc", type="x"
etc.
Rules are grouped and mapped to a user.
Account are created in system, and admin has to approve them. When admin login based on his rule set, admin should see relevant accounts.
Like if admin rule set is amount>500, then any account less 500 is not shown to him.
My question is best way to implement it in database, how to query so that relevant accounts can be fetched depending on underlying rule set.