Data

ORM

A translation layer that lets you read and write the database using normal code instead of raw SQL.

An ORM (Object-Relational Mapper) turns database rows into objects in your programming language, so you write `db.users.findMany()` instead of hand-writing SQL strings. It's like using a typed API for your data: you get autocomplete, the compiler catches typos in column names, and you're far less likely to ship a SQL injection bug. The tradeoff is a layer of abstraction that can hide what query actually runs, so for gnarly performance-sensitive queries you sometimes drop down to raw SQL anyway. For AI-built apps a typed ORM like Drizzle is a big win because the type errors give the model concrete feedback when it gets a field wrong.