Computing without databases is like going into a grocery store and all of the items are in one great pile. Sure, given enough time (CPU) and resources (RAM) you could find what you’re looking for, but it’s horribly inefficient.
Instead, things which are similar are grouped together, like the baking aisle (tables) and if you have to get most of the items for a cake, you know it’s on a specific shelf.
This is what notification profiles were built for. Set it to work/school/whatever and select who you want to get through and notifications are delivered, all else are silenced.
I even have one called “Blackout”. Nothing gets through, no one is approved, everything is silenced—for when I absolutely must not be disturbed.