What knoweldge framework supports this type of query?
Well, to answer my own question, it turns out the issues I was struggling with are almost exactly the issues that motivated the development of and that are addressed by graph databases.  I would have been out of luck if this was 1999, but it turns out 2016 is a good time to be alive for databases that go beyond the traditional relational model!  I guess all this NoSQL stuff that the kids are always talking about is more than just hype.  :)