This document discusses object-relational mappers (ORMs) and active records, which bridge the gap between object-oriented languages and relational databases. It covers some of the tradeoffs of using ORMs, including performance impacts. It also discusses techniques for optimizing database queries from an ORM, such as managing indexes, eager loading, lazy loading and inviting the database to join data rather than doing joins client-side. The overall message is that ORMs provide benefits but also performance costs, and programmers should understand how their code will translate to database queries.