"Some Java programmers avoid complex SQL statements such as this one. A surprisingly common, but very inefficient, workaround is to write lots of Java code that iterates through multiple result sets. But the database is a lot better at executing query code than a Java program can bethat's the core competency of a database.
A rule of thumb: If you can do it in SQL, don't do it in Java."
Sourced from Core Java Volume 2 (7th Edition), Chapter 4
Have you encountered instances of the mentioned workaround?
This is purely for historic fascination. Does it relate to JavaDB?
Is it possible to use DataSource, to take advantage of connection pooling and distributed transactions? Would you have an example? How does DataSource fit into an architectural diagram?
A rule of thumb: If you can do it in SQL, don't do it in Java."
Sourced from Core Java Volume 2 (7th Edition), Chapter 4
Have you encountered instances of the mentioned workaround?
This is purely for historic fascination. Does it relate to JavaDB?
Is it possible to use DataSource, to take advantage of connection pooling and distributed transactions? Would you have an example? How does DataSource fit into an architectural diagram?