Don't perform basic SQL tasks in code

Relational databases are a mature technology, and they should be used to do as much simple work as possible.

For example, don't do the following in code, if they can be done in SQL instead:

Any corresponding task implemented by your own code would very likely: To retain the order of a ResultSet as specified in ORDER BY, choose a collection which has a defined iteration order, such as an ArrayList or a LinkedHashMap.

See Also :
Implementing compareTo
Choosing the right Collection
Reduce database code duplication
Implement code tables
Would you use this technique?
Yes   No   Undecided   
© 2014 Hirondelle Systems | Source Code | Contact | License | RSS
Individual code snippets can be used under this BSD license - Last updated on September 21, 2013.
Over 2,000,000 unique IPs last year - Built with WEB4J.
- In Memoriam : Bill Dirani -