4 ms·
Agreed. The ORM vs raw SQL debate is endless, but I prefer using some kind of ORM-y thing when I need to interact with a relational database from a program. T
by mshenfield 9y ago
Agreed. The ORM vs raw SQL debate is endless, but I prefer using some kind of ORM-y thing when I need to interact with a relational database from a program.
There are still cases where you might build a collection of raw queries (think business analysis using Hive/Impala/Spark SQL). I think it's important to approach it the same way you would a normal program: how can I make my intention clear, how can I verify it works as I expect, how can I reuse without reducing clarity.
Also, just a little joke: https://i.imgflip.com/1rhhzl.jpg https://i.imgflip.com/1rhhzl.jpg
- weberc2 9y agoQuery builders are a sort of middle ground between raw SQL and ORMs. They give you database agnosticism and help to prevent syntax errors, etc, especially if your language is statically typed. But they also allow you control over the query performance.