Antipattern9.7 Handcrafted SQL

Essentially every application today must work with a relational database. Many applications rely on object/relational mapping to bridge the gap. Whether you’re using Ruby on Rails’ ActiveRecord, Hibernate, or any of the three EJB persistence models, some form of object/relational mapping is in play. ORM packages generate very predictable, repetitive SQL. Predictable access patterns of SQL are good for capacity, because a competent DBA can tune the database to make those queries perform well.[71]

Each of these ORM layers allows the developer to get down to direct SQL access in one way or another. Hibernate, for example, allows ...

Get Release It! now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.