Prisma
ELI5 — The Vibe Check
Prisma is the ORM that made TypeScript developers actually enjoy working with databases. You define your schema in a special file, and Prisma generates a fully type-safe client. Every query is autocompleted. Every result is typed. It's like having a database that speaks TypeScript.
Real Talk
Prisma is a next-generation Node.js and TypeScript ORM that provides a declarative schema language, auto-generated type-safe query builder, automated migrations, and a visual database browser (Prisma Studio). It supports PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB.
Show Me The Code
// schema.prisma
model User {
id Int @id @default(autoincrement())
email String @unique
posts Post[]
}
// Usage
const user = await prisma.user.findUnique({ where: { email: 'a@b.com' } })
When You'll Hear This
"Prisma's type safety caught a wrong column name at compile time." / "We migrated from raw SQL to Prisma and our codebase got 40% smaller."
Related Terms
Migration
A migration is a versioned script that modifies your database schema — adding a column, creating a table, changing a type.
ORM (Object-Relational Mapper)
An ORM is like a translator between your code and your database. Instead of writing scary SQL, you just write normal code like `User.
Schema
A database schema is the blueprint of your database — which tables exist, what columns they have, what types they are, and how they relate to each other.
TypeScript
TypeScript is JavaScript with a strict parent watching over it.