If All You Have Is a Database, Everything Looks Like a Nail
Relational databases are just &quot;the way we do things around here&quot;. They may have been smart at one point, but they haven&#x27;t made sense since we started putting web frontends on our applications (it&#x27;s not a coincidence that the most successful &quot;database&quot; for that was MySQL which, at the time, supported approximately none of the alleged virtues of databases), they certainly don&#x27;t make sense now.<p>There&#x27;s one thing that SQL databases are good for: semi-ad-hoc reporting queries (and their transactional stuff is grossly overengineered for this use case, so remember to turn it off). Produce a read-only SQL database for your analysts&#x2F;data scientists to use, either regular dumps or updated in real time. But you absolutely must treat it as write-only from the point of view of your live system; doing programmatic queries of an SQL database is madness on several levels: SQL is not machine-friendly, the performance characteristics of any given query are obscure, and the transaction system means you&#x27;re virtually guaranteed to deadlock yourself sooner or later.