🗃️Object-Relational Mapping (ORM)
Also known as ORM, Object Relational Mapper
Code that lets you use rows as objects in your own language. You write no SQL.
Think of it like
Think of it like a helper who speaks two tongues. You talk in yours, and it talks to the database in its own.
Example
Emma's Python app uses an ORM. She writes Customer(name="Lucy") and the ORM sends the INSERT for her.
Why it matters
Most web frameworks come with an ORM. It is how many coders talk to a database each day.
Definition
Common mistake
Key takeaways
- 1Rows as objects. Use your own language, not SQL.
- 2SQL written for you. The ORM builds and runs it.
- 3Check what it sends. It can hide slow queries.