How Many Developers Prefer Raw SQL Over ORMs?

0
4
Asked By CuriousCoder477 On

I'm really curious about how many developers primarily use raw SQL compared to relying on an ORM. My current tech stack involves Svelte for the frontend and Node/Express with Knex.js for querying, but I've been sticking with raw SQL, particularly with Better-sqlite3 for MVPs. I find Knex.js and ORMs to be cumbersome, so I've opted for raw SQL while ensuring I'm using bindings to protect against SQL injection. Also, I'm working with session-based credentials instead of JWTs for client APIs, using axios, along with CORS. What's your experience with raw SQL versus ORMs?

5 Answers

Answered By RawSQLFanatic On

Honestly, I prefer raw SQL. I'm a big fan of Dapper because it simplifies entity mapping without all the bloated ORM overhead.

Answered By DataDude2023 On

I find myself using both! Often, I resort to ORMs for simpler CRUD operations, but when it comes to more elaborate queries or bulk updates, raw SQL saves the day.

Answered By TechOldie66 On

I think raw SQL has its charm! Though I appreciate the convenience of ORMs, I stick with SQL for deep control over my database interactions.

Answered By ORMisLife203 On

I generally stick to ORMs like Laravel’s Eloquent for most things due to type safety and convention. But I use raw SQL for more complex queries when I need more control.

Answered By SQLNinja92 On

It really depends on the project. For situations where performance is critical, like with complex queries in Postgres, I usually stick to raw SQL to exploit features that ORMs might not support, such as `CROSS JOIN LATERAL`. For general backend stuff, I lean towards ORMs for ease and safety.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.