Introducing Prisma 2

Next-generation ORM
for Node.js and TypeScript

Prisma helps app developers build faster and
make fewer errors with an open source ORM for PostgreSQL, MySQL and SQLite.

npm install @prisma/cli -D
Try Prisma in 5 minutes
Code Editor
1
2
// Creating a new record
Database
idfirstNameemailactive

1Patrickpatrick@prisma.iotrue
2Edeneden@prisma.iotrue
3Dylandylan@prisma.iofalse
4Ankianki@prisma.iotrue
5Juracijuraci@prisma.iofalse
Supported Languages
JavaScript
TypeScript
Supported Databases
MySQL
PostgreSQL
SQLite
Setup Prisma
Play VideoPlay Video

Be More Productive with Your Database

Prisma makes database access easy with an auto-generated and type-safe query builder that's tailored to your database schema. It provides an alternative to traditional ORMs and SQL query builders. Start with a new database or introspect an existing one to get started. Prisma currently supports PostgreSQL, MySQL & SQLite – more to come!
API Server
  • No more CRUD boilerplate
  • Supports all web frameworks

Designed for building APIs
(REST, GraphQL, gRPC, ...)

Prisma is the perfect companion for building web APIs. It saves repetitive CRUD boilerplate and provides a flexible API for common use cases such as pagination and filtering.

prisma.user.findMany();
Prisma Client
  • Developer-friendly API
  • Autocompletion for DB queries

Focus on your data
not on complex SQL queries

Prisma Client makes it easy to reason about database queries. No more debugging of SQL or complex ORM models – only an intuitive API and plain old JavaScript objects.

SELECT * from User;
Database
  • Tailored to your data
  • Incrementally adoptable
  • Postgres
  • MySQL
  • SQLite

Incremental adoption with your existing database

Introspect your database schema and start sending queries with Prisma Client. You can use Prisma Client side-by-side with existing ORMs or SQL queries in your application.

Explore the Prisma Client API

Installation & DB Setup

# Install Prisma CLI 
 
$ npm install @prisma/cli --save-dev
# Create Prisma schema in current directory 
 
$ npx prisma init

Show the result
✔ Your Prisma schema was created at prisma/schema.prisma.
  You can now open it in your favorite editor.
// prisma/schema.prisma
// Connect database via environment variable in Prisma schema
 
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
# Introspect your database schema 
 
$ npx prisma introspect

Show the result
Introspecting based on datasource defined in prisma/schema.prisma …
 
✔ Wrote Prisma data model into prisma/schema.prisma in 18ms
 
Run prisma generate to generate Prisma Client.
Image of a CLI

Ready to Try?

Add Prisma to Your App or Start From Scratch

Try Prisma in 5 minutes