ORM or plain SQL?
Er, no.
The question isn't: "ORM or plain SQL".
The question is: Do you know SQL well enough to use an ORM?
If you don't know how SQL (and relational databases in general) works and you choose to start with an ORM, then you'll be at the ORM's mercy. You'll be prone to writing an infamous "n+1 query", creating data redundancies, difficult-to-query data, and whatnot. Heck, I've seen 1:n relationships implemented as JSON blob columns.
To be clear, the ORM is not the culprit. It's the lack of understanding the fundamentals of relational databases that will have brought you there.
The question, "should I learn SQL or just pick an ORM?" is wrong in itself. Learn SQL, learn relational databases, and then you'll enjoy the freedom of choice. 💐
=> More informations about this toot | More toots from christophberger@c.im
@christophberger
Today I saw a balloon. 😜 😎 :bd204:
=> More informations about this toot | More toots from tabernac@c.im This content has been proxied by September (3851b).Proxy Information
text/gemini