logoalt Hacker News

miohtamatoday at 6:38 AM3 repliesview on HN

SQL is pretty shitty language to write modular, reusable and easy to read code.


Replies

Cthulhu_today at 8:29 AM

ORMs often end up defining their own domain-specific language which is neither SQL nor the language itself, so they don't really solve that problem except in the simplest cases.

show 1 reply
Foobar8568today at 7:59 AM

It's easy to read SQL code as long as the person writing the query doesn't resort to "hack" the planner. Now to make that reusable....That's another beast and most often will defeat the purpose of writing pure SQL in the first place, let's put a OR there, let's call several queries, let's screw the data model.

Mikhail_Edoshintoday at 7:44 AM

It solves a hard problem. For example, it completely insulates the sender from the fact that his transaction is just one among many others.

show 1 reply