In my opinion, I feel more comfortable tuning a raw SQL query to get better performance than tuning the ORM to work in a very specific way to run the very same query and get the performance benefit. However, for easy selects/updates it's more convenient using the ORM and getting the benefit of serializing the results to a domain entity
Are you in doubt between a plain file and sqlserver and you think it doesn't worth the hassle of installing a full blown sql server, making backups regularly, etc.? use sqlite.
Most of the time on $client project we use a query builder, so it’s expressing the intended query as methods.
You’d have a hard time using it without understanding what operations you want - it just handles all the repetitive stuff for you.
Then there’s times when we need a query that’s too complex for what the QB methods support, so we use the custom query mode, where we can mix specific parts of a custom query with some of the stuff the QB generates.
Many of my etl processes are based on stored procedures. These are large transfers usually via bulk copy (bcp).
Crud operations are done via orms (Entity Framework) or a light orm, Dapper which requires sql statements at times.
Generally, I try to avoid complex sql statements though they are necessary.
I’ve used several ORMs for different languages. Dapper and stored procedures have become my favorite approach. Like anything, there are trade offs. You end up with logic hidden in the DB or sometimes need to update your procs after you alter a table. If you have a good pattern established for your tables, you can easily autogenerate CRUD procs for each table!
it's an exceptionally good language for querying data. One of my favorite languages ever. focused, easy to understand (except the really complex stuff but that applies to all languages).