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, ...

Get Release It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.