(no title)
materielle | 4 months ago
We already have an abstraction for interfacing with the DBMS. It’s called SQL, and it works perfectly fine.
materielle | 4 months ago
We already have an abstraction for interfacing with the DBMS. It’s called SQL, and it works perfectly fine.
bakugo|4 months ago
ORMs are not an abstraction to interface with the DBMS. They are an abstraction to map the data in your database to objects in your code and vice versa. It's literally in the name.
Feels like a lot of anti-ORM sentiment originates from people who literally don't know what the acronym means.
lelanthran|4 months ago
Maybe that's part of the problem - you're trying to map tabular data in your database to hierarchical data in your programming language.
Of course there's going to be all kinds of pain when pounding square pegs into round holes. Getting a better hammer (i.e. a better ORM) isn't necessarily going to help.
gitaarik|4 months ago
It allows for functional programming, as in building queries upon other queries. And predefined filters, easily combining queries, etc. And much more.
Of course you don't need all of that. But in a big project, where you might query some particular tables a lot of the times, and there are common joins you make between tables, then sometimes it is nice to have predefined models and columns and relations, so you need less verbosity when building the queries.
You do of course need to learn a new tool to build queries, but it does pay off in some cases.
kdazzle|4 months ago
jaggirs|4 months ago