15 ms·
1. For static SQL, write views or procedures (i.e. raw SQL). 2. For dynamic SQL, use jOOQ or something similar in your language. 3. For the rare case of reall
by lukaseder 9y ago
1. For static SQL, write views or procedures (i.e. raw SQL).
2. For dynamic SQL, use jOOQ or something similar in your language.
3. For the rare case of really needing object graph persistence (loading a graph of entities, manipulating it, and storing the changes back to the database), or the less rare case of doing boring single-record CRUD, use an ORM. You don't want to do that with SQL.