Concept
A query builder composes SQL safely from code; an ORM maps rows to objects and writes the SQL for you. Both save typing on the common paths, and you still need to see the SQL they generate.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Query builders and ORMs doing its job.
// Kysely: typed query builder
const rows = await db
.selectFrom("orders")
.innerJoin("customers", "customers.id", "orders.customer_id")
.select(["orders.id", "orders.total_cents", "customers.email"])
.where("orders.status", "=", "paid")
.orderBy("orders.created_at", "desc")
.limit(20)
.execute(); // rows is typed from the schemaLoading a list of parents and then each one's children in a loop through the ORM. It is the N+1 problem again: one query per row. Join or batch-load the children.
Your roadmap puts these before Query builders and ORMs, unless you already know them.
Once a session shows you understand Query builders and ORMs, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Query builders and ORMs.