I have a table of 100,000 USERS users (name, age, gender, phone, company, street, city, state, country, zip code, etc.).
I also have a table of thousands of advertisements that are offered to users. Now for each advertisement, I need to add a rule that determines which subset of users it refers to.
For example, a rule might be: All users who have a zip code from 10,000 to 19999.
Another rule could be: All users who are women and do not live in the United States.
However, the third rule may be: users over 18 who live in DC, MD or VA. Etc etc.
Now, given a specific user, I want to (effectively!) Find out which PROMOTIONS apply to that user.
What is a good strategy for modeling these rules, given that I want to be able to quickly find the right promotions for a specific user?
source
share