I have a table, let's call it Widgets, a Tags table with about 30 tags, a WidgetsTags table that joins each widget with any number of tags, and a table called LandingPages, the landing pages are for SEO purposes, they offer pre-filtered versions of the widgets table that match popular searches. That way when someone searches "Vehicle widgets for sale in Florida", in which matching tag logic would look like this:
For-Sale && Florida && (Car || Motorcycle || Truck)
There can be other forms of boolean logic for the various landing pages.
What I want to do is, when a user adds a widget to my app, and selects a handful of tags, the app then knows which landing pages to assign that widget to, based on each landing page's tag logic. I'm debating storing an actual boolean expression as a varchar in the landing page, then parsing each when a widget is added. Or some sort of system of tables, but I figured someone has wrestled with this problem before. If it helps, I am using C#, with a SQL Server backend.