SQL&#x27;s fine on its own. The problem arises when you try to manipulate it. A query to get messages that were sent between now and a week ago, joining in the user table for both the sender and the receiver to get their full names, is sensible enough when written out as SQL. I can quibble about some of the affordances of SQL, but it&#x27;s good enough for most queries. The problem is if you try to create some sort of data that represents &quot;get the message body&quot;, &quot;messages sent since last week&quot;, &quot;get the sender&#x27;s name&quot;, &quot;get the receiver&#x27;s name&quot;, and somehow programmatically assemble a query out of the pieces. (Slight quibble, this isn&#x27;t actually about OO, this is about &quot;anything that isn&#x27;t SQL&quot;. A Haskell library will have the exact same problem.) An AST-based approach doesn&#x27;t guarantee that this will be easy, but it&#x27;s still a step above trying to assemble an SQL query from those pieces.<p>It&#x27;s totally possible. There&#x27;s a ton of libraries that do it in various ways. It&#x27;s just not even remotely <i>easy</i>, like it should be. If you look into the inside of those libraries you&#x27;ll find a C&#x27;thulian monstronsity of special cases interacting with special cases until the whole thing just explodes into a brain-consuming mess, because SQL was very, very clearly not written for this use case.<p>In another 10 or 20 years I look forward to data-based analysis that tries to determine how much of the &quot;NoSQL&quot; movement was because the relational data model doesn&#x27;t work for all use cases, and how much of it was the entirely accidental (in the Brooks sense) problems with A: SQL, the language itself, not its capabilities and B: schema migrations with no <i>essential</i> reason to be as painful as they are. (And something something column stores, but I&#x27;m not sure where they fit into this story exactly.) And to be clear on tone, I really am interested. I&#x27;m pretty sure the answer won&#x27;t be either extreme but I&#x27;m pretty uncertain about where in the middle we&#x27;ll fall.