Skip to content

Overview

Source URL: https://docs.prisma.io/docs/orm/core-concepts/supported-databases

Prisma ORM supports PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and serverless databases

  • Self-hosted
DatabaseVersion
PostgreSQL9.6+
MySQL5.6+
MariaDB10.0+
SQL Server2017+
SQLiteAll
MongoDB4.2+
CockroachDB21.2.4+
  • Managed/Serverless
DatabaseNotes
NeonServerless Postgres
SupabasePostgres
PlanetScaleMySQL
TursolibSQL (SQLite)
Cloudflare D1 (Preview)SQLite
AWS AuroraMySQL/Postgres
MongoDB AtlasMongoDB
  • Constraints
FeaturePostgreSQLMySQLSQLiteSQL ServerMongoDB
PRIMARY KEY✔️✔️✔️✔️✔️
FOREIGN KEY✔️✔️✔️✔️
UNIQUE✔️✔️✔️✔️*✔️
NOT NULL✔️✔️✔️✔️✔️
DEFAULT✔️✔️✔️✔️✔️

*SQL Server has limitations with UNIQUE constraints

  • Data types
FeaturePostgreSQLMySQLSQLiteSQL ServerMongoDB
Arrays✔️✔️
JSON✔️✔️✔️✔️✔️
Enums✔️✔️✔️✔️
  • PostgreSQL — Self-hosted, Neon, Supabase, and CockroachDB
  • MySQL/MariaDB — Self-hosted and PlanetScale
  • SQLite — Local, Turso, and Cloudflare D1
  • SQL Server
  • MongoDB
  • Driver adapters

For custom database drivers, see Driver adapters.