I have a table of 100,000s of USERS (name, age, gender, phone, company, street, city, state, country, zipcode, etc).
I also have a table of thousands of PROMOTIONS which are offered to users. Now, for each promotion I need to add a rule which defines which subset of users it applies to.
For example, a rule might be: All users which have a zipcode of 10000 to 19999.
Another rule might be: All users which are female and do NOT live in the U.S.
Yet a third rule could be: Users older than 18 that live in DC, MD or VA. Etc etc.
Now given a specific user, I want to (efficiently!) find out which PROMOTIONS apply to that user.
What is a good strategy of modeling these rules, given that I want to be able to quickly find matching promotions given a specific user?