<story><title>SQL databases come up with algorithms you’d never have dreamed of (2017) [video]</title><url>https://www.youtube.com/watch?v=wTPGW1PNy_Y</url></story><parent_chain><item><author>ak39</author><text>So in 20 years we&amp;#x27;ve gone from vilifying SQL statements in code, witch-hunted folks who did this and instead invented and propped up clunky ORM implementations, ignored sage advice on the famous &amp;quot;object-relational impedance mismatch&amp;quot; (which the author claims he doesn&amp;#x27;t &amp;quot;believe&amp;quot; exists - it&amp;#x27;s not a choice btw) and now, after 20 years of agent orange in the bloody Vietnam of Computer Science, we are presenting why SQL was better all along - showing off windowing functions as examples? This is irony that took 20 years to sink in.&lt;p&gt;Am I understanding this guy&amp;#x27;s presentation correctly? (I left around the 20 min mark of the 50 min presentation).</text></item></parent_chain><comment><author>lugg</author><text>I dunno. I think there is quite a lot of us that have consistently expressed the stupidity that is wrapping a powerful query language in a mediocre, limited, buggy, half baked, shoe horned into OO shit what was I saying?&lt;p&gt;Oh yea, ORM.&lt;p&gt;I&amp;#x27;ve always veiwed it as a legitimate (though always over engineered) solution to wrap some repetitive database operations in a consistent manner.&lt;p&gt;The biggest issue with ORM isn&amp;#x27;t the solution they came up with, half baked and buggy as they are, but the problem they are actually employeed to &amp;quot;solve&amp;quot;: developers afraid of SQL. Whether they can&amp;#x27;t write it, can&amp;#x27;t learn it, or just straight hate the string representation in their code, it&amp;#x27;s the main reason people sign on for ORM.&lt;p&gt;Then they prop it up with all manner of baseless reasoning.&lt;p&gt;Theb there is the leakyness. ORMs are usually quite fluid in their language, they make it easy to represent the database in code. The only issue is that it isn&amp;#x27;t there. It&amp;#x27;s a separate thing. When you see database code it should be obvious and very far away from business logic. What does ORM do? Mix it all up  On purpose. Have fun with all the mocks.</text></comment>
<story><title>SQL databases come up with algorithms you’d never have dreamed of (2017) [video]</title><url>https://www.youtube.com/watch?v=wTPGW1PNy_Y</url></story><parent_chain><item><author>ak39</author><text>So in 20 years we&amp;#x27;ve gone from vilifying SQL statements in code, witch-hunted folks who did this and instead invented and propped up clunky ORM implementations, ignored sage advice on the famous &amp;quot;object-relational impedance mismatch&amp;quot; (which the author claims he doesn&amp;#x27;t &amp;quot;believe&amp;quot; exists - it&amp;#x27;s not a choice btw) and now, after 20 years of agent orange in the bloody Vietnam of Computer Science, we are presenting why SQL was better all along - showing off windowing functions as examples? This is irony that took 20 years to sink in.&lt;p&gt;Am I understanding this guy&amp;#x27;s presentation correctly? (I left around the 20 min mark of the 50 min presentation).</text></item></parent_chain><comment><author>thegeomaster</author><text>Recently I tried using an ORM &amp;quot;properly&amp;quot; for a bigger application. I tried for days to fix the performance problems, which were mainly caused by serialization&amp;#x2F;deserialization overhead because of humongous generated queries where I didn&amp;#x27;t need 90% of the info.&lt;p&gt;I finally gave up, and now most of the ORM usage in the codebase is just to communicate my custom queries to the underlying database and translate to&amp;#x2F;from domain entities. I feel like this is the sweet spot―give me a thin abstraction over SQL and do the gruntwork of converting domain entities to tables and vice-versa, but nothing else, thanks.&lt;p&gt;I&amp;#x27;m still unhappy about the performance (when everything is in the working set, query takes 2ms and returns a couple of rows but the whole API call, which doesn&amp;#x27;t do much except massage the response to some kind of JSON, takes 30ms!), but that&amp;#x27;s on me for my ORM&amp;#x2F;language&amp;#x2F;runtime choice, I suppose.</text></comment>