by jiggy2011 · 12y ago · 0 comments
Even if you throw out of the ORM and go with writing SQL queries by hand, do we need to understand how the database will parse the SQL, how it stores the data on disk and how it executes the query?
The main reason to understand SQL when building a web application is really that the ORM doesn't provide a full abstraction due to the differences between the relational model and the OO model. If we could solve that then we could happily never use SQL again.
Yes, I've thought that, too, but it turns out that, beyond a certain relatively low level of complexity, that's a great way to produce SQL queries which take a half hour to complete.
> but helpful to understand how an ORM converts to a SQL query.
Certainly, because there's a degree of complexity beyond which your ORM's going to start getting pathological and you're going to have to fall back on querying the database directly, which see point one.