# Supported databases (/docs/orm/supported-databases) > For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL. Which databases Prisma ORM 8 supports today, what each one gets, which hosted providers work, and which databases are coming. Location: ORM > Supported databases Prisma ORM 8 ships one library per database, and installing the one that matches yours brings the config, the client, contract authoring, and migrations with it, except that the MariaDB library has no client yet. Today there are two you can build on, an experimental third, and early previews of a fourth and a fifth. | Database | Status | Library | Install | | ------------------------------------- | ------------------------------------------- | ---------------------- | ---------------------------------- | | PostgreSQL, including Prisma Postgres | Release candidate | `@prisma/orm-postgres` | `npm install @prisma/orm-postgres` | | MongoDB | Early access | `@prisma/orm-mongo` | `npm install @prisma/orm-mongo` | | MySQL | Early preview, migrations, reads and writes | `@prisma/orm-mysql` | `npm install @prisma/orm-mysql` | | MariaDB | Early preview, migrations only | `@prisma/orm-mariadb` | `npm install @prisma/orm-mariadb` | | SQLite | Experimental | `@prisma/orm-sqlite` | `npm install @prisma/orm-sqlite` | | Microsoft SQL Server | Coming soon | | | | CockroachDB | Coming soon | | | `npm create prisma@latest -- my-app` asks which database you use and installs the right library for you. See [Create a new app with PostgreSQL](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql) or [Create a new app with MongoDB](https://www.prisma.io/docs/prisma-orm/quickstart/mongodb). ## What the labels mean [#what-the-labels-mean] **Release candidate.** Install it and build with it today. Until the final release, some details of the API may still change, so code you write now may need small edits later. Each release candidate fixes bugs found in the last one. [Release status](https://www.prisma.io/docs/orm/release-status) has the dates and what `npm install` gives you. **Early access.** The library works and you can build with it, but some of what the PostgreSQL library does is not there yet. The table below and the reference pages say what works on MongoDB, and [what is not available yet](https://www.prisma.io/docs/orm/coming-from-prisma-orm-7#not-available-yet) lists the gaps. Report what you hit on [GitHub](https://github.com/prisma/orm/issues). **Experimental.** SQLite is published as an experimental package, [`@prisma/orm-sqlite`](https://www.prisma.io/extensions/sqlite), without a quickstart yet. `db.transaction(...)` works the same way as on PostgreSQL. The date and time types `DateTime`, `Date`, `Time` and `Duration` work as on PostgreSQL, with `as:` choosing what your code reads, such as `DateTime(as: string)` or `Date(as: temporal)`, and SQLite stores every one of them as text. A duration is stored as written, so a filter on `PT60M` does not match a row written as `PT1H`, and a `Duration` field cannot be ordered. Write durations in one form if you filter on them. A field read `as: temporal` needs a global `Temporal` in your app, such as `import 'temporal-polyfill/full/global'`, or reading it fails with [`RUNTIME.TEMPORAL_UNAVAILABLE`](https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TEMPORAL_UNAVAILABLE). `db verify` reads a column default of `date('now')` as the current date, so it matches only a field written `Date @default(now())`. `@prisma/orm-sqlite` declares `temporal-polyfill` as a peer dependency, which npm, pnpm and bun install for you. With Yarn, or with pnpm when its `autoInstallPeers` setting is `false`, add `temporal-polyfill` to your dependencies, or the `prisma` commands fail because they cannot find it. **Early preview.** MySQL is published as `@prisma/orm-mysql` so you can try it. Against a MySQL 8.4 server with its default settings, a URL such as `mysql://root:password@localhost:3306/app` fails with a message that MySQL sign-in needs the server's public key. The `prisma` commands report it as `DRIVER.CONNECTION_FAILED`, and your app's first query as `CONTRACT.MARKER_READ_FAILED`. Add `allowPublicKeyRetrieval=true` to the URL, as in `mysql://root:password@localhost:3306/app?allowPublicKeyRetrieval=true`. The server remembers a successful sign-in until it restarts, so a URL without the setting can work for a while and then fail again. Fetching the key this way sends it without TLS, so a machine between your app and the server could read the password; keep it to a server on your own machine or network. Your app can read from and write to MySQL with the ORM and the SQL builder, including nested and ordered includes, through `mysql({ contract, url })` from `@prisma/orm-mysql/runtime` and `contractFromJson` from `@prisma/orm-mysql/static`, and can run raw SQL and `db.transaction(...)`. ORM `create`, `update`, `upsert` and `delete` return the rows they wrote, as on PostgreSQL. MySQL has no `RETURNING`, so the ORM writes the rows and then reads them back by their key in the same transaction. The transactions the ORM opens for its own writes run at READ COMMITTED, so when binary logging is on it must be row-based (`binlog_format = ROW`, MySQL 8.4's default); with statement-based logging, MySQL refuses those writes with error 1665. A `db.transaction(...)` callback uses the server's default isolation level unless you pass one, as `transactionOptions: { isolationLevel: 'ReadCommitted' }` to `mysql(...)` or as the second argument of `db.transaction`. Before `8.0.0-rc.24`, every session ran at READ COMMITTED. The contract must list every unique index of a table the ORM upserts into. MySQL's `ON DUPLICATE KEY UPDATE` fires on any unique index, not only the one `conflictOn` names. A collision on an index the contract does not list makes `upsert` fail with `ORM.MUTATION_ROW_MISSING`, or update the row that index matched and return the `conflictOn` row unchanged. `npx prisma db verify --strict` reports unique indexes the contract does not list. `delete` reads the row first and then deletes it. Row locks such as `FOR UPDATE`, `LATERAL` joins, `RETURNING`, and skipping rows that collide with a unique constraint are refused with a message that they are not supported on MySQL yet. The `mariadb` package that runs each statement writes its values into the statement with its own escaping, so Prisma's code never puts a value into SQL. A value stays inside its quotes only while your raw SQL keeps to the [driver's environment requirements](https://github.com/prisma/orm/blob/v8.0.0-rc.24/packages/3-targets/mysql/1-mysql/3-driver/README.md#environment-requirements). Raw SQL must not add `NO_BACKSLASH_ESCAPES` or `ANSI_QUOTES` to `sql_mode`, or change `character_set_client` or `character_set_results` from utf8mb4. It must also keep `NO_AUTO_VALUE_ON_ZERO` in `sql_mode`, or an ORM `create` that writes 0 to an auto-increment key fails with `ORM.MUTATION_ROW_MISSING`. Put a space after a value in raw SQL when a quote, `#`, `/*` or `--` follows it. `DateTime`, `Date`, `Time` and `Duration` work as on PostgreSQL, and `storage:` chooses the column, such as `DateTime(storage: timestamp)`. A `DateTime` field refuses to write a value outside its column's range, with `RUNTIME.ENCODE_FAILED`. It drops the digits of a second that its column does not hold, so a column without fractions of a second stores a value without its milliseconds. A `datetime` column holds the years 1000 to 9999, and a `timestamp` column holds 1970-01-01T00:00:01Z to 2038-01-19T03:14:07.999999Z. A duration is stored as written, so a filter on `PT60M` does not match a row written as `PT1H`. A field read `as: temporal` needs a global `Temporal` in your app, as on SQLite. `@prisma/orm-mysql` declares `temporal-polyfill` as a peer dependency, so with Yarn, or with pnpm when its `autoInstallPeers` setting is `false`, add it to your dependencies yourself. With `defineConfig` from `@prisma/orm-mysql/config` in `prisma.config.ts`, `npx prisma contract emit`, `migration plan`, `db migrate`, `db verify` and `db sign` work against MySQL 8.4 for creating and dropping tables, columns, indexes, unique constraints and foreign keys. Any other schema change is refused with a message that it is not supported on MySQL yet. MySQL cannot roll back a schema change, so a failed migration leaves the operations that ran before the failure applied, as on MongoDB. When you run `db migrate` again, it skips each operation whose postcheck shows its change is already in the database. An operation without a postcheck runs again, and a precheck that still fails stops the run again. **Early preview, migrations only.** MariaDB is published as `@prisma/orm-mariadb`, a target that extends MySQL. With `defineConfig` from `@prisma/orm-mariadb/config` in `prisma.config.ts`, `prisma contract emit`, `prisma db migrate`, `prisma db verify` and `prisma db sign` work against MariaDB, and the contract records `"target": "mariadb"`. There is no MariaDB client for your app yet. **Coming soon.** There is no Prisma ORM 8 library for the database yet. Prisma ORM 7 supports it, and Prisma ORM 7 keeps receiving bug fixes and security updates for 18 months after Prisma ORM 8 reaches general availability. [How to stay on Prisma ORM 7](https://www.prisma.io/docs/orm/release-status#how-to-stay-on-prisma-orm-7) shows how to lock the version. ## What each database supports [#what-each-database-supports] The ORM client works the same on both databases. The lower-level query APIs follow the database's own query model. | Feature | PostgreSQL | MongoDB | | ----------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------ | | [ORM client](https://www.prisma.io/docs/orm/reference/orm-client) | Yes | Yes | | [SQL query builder](https://www.prisma.io/docs/orm/reference/sql-query-builder) | Yes | No | | [Pipeline builder](https://www.prisma.io/docs/orm/reference/pipeline-builder) | No | Yes | | [Raw queries](https://www.prisma.io/docs/orm/reference/raw-queries) | Raw SQL | Raw commands | | [Transactions](https://www.prisma.io/docs/orm/fundamentals/transactions) | Yes | Not yet | | [Migrations](https://www.prisma.io/docs/orm/migrations/how-migrations-work) | Yes | Yes | | [Extensions](https://www.prisma.io/docs/orm/extensions) (pgvector, PostGIS, and more) | Yes | The client accepts extension packs, but every pack published today is for PostgreSQL | | [Middleware](https://www.prisma.io/docs/orm/middleware/how-middleware-works) | Yes | Yes, except `beforeCompile` | The MongoDB client has no `db.transaction()`, because Prisma ORM does not support MongoDB transactions yet. For multi-document writes on MongoDB, [use the MongoDB driver's session API](https://www.prisma.io/docs/orm/fundamentals/transactions#transactions-on-mongodb) alongside the client. Middleware hooks are the same on both databases apart from `beforeCompile`, which rewrites the SQL query before it runs and so exists only on PostgreSQL. The built-in `lints` and `budgets` middleware inspect SQL and run on PostgreSQL. The `cache` middleware registers on both, but caches only on the SQL databases, because a MongoDB read has no way to be opted in yet. See [which databases a middleware runs on](https://www.prisma.io/docs/orm/middleware/how-middleware-works#which-databases-a-middleware-runs-on). Every extension in the [directory](https://www.prisma.io/extensions) lists the databases it targets. Today every extension that adds column types, operators, or index types targets PostgreSQL, and the only entry that lists MongoDB is the MongoDB library itself. ## Managed and hosted databases [#managed-and-hosted-databases] Prisma ORM connects with a standard connection string, so any host that gives you one works. | Provider | Database | Notes | | ------------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | [Prisma Postgres](https://www.prisma.io/docs/postgres) | PostgreSQL | The default in `npm create prisma@latest`. Provisioned from the CLI, with connection pooling built in. | | Supabase | PostgreSQL | The [Supabase extension](https://www.prisma.io/extensions/supabase) adds the auth and storage tables and role-bound clients. | | Neon, Railway, Render, AWS RDS, Cloud SQL, self-hosted | PostgreSQL | Any PostgreSQL server. Extensions such as pgvector and PostGIS need the server-side extension to be installable, which most managed providers include. | | MongoDB Atlas, self-hosted MongoDB | MongoDB | Any MongoDB deployment reachable with a `mongodb://` or `mongodb+srv://` URL. | Need a database? [`npx create-db`](https://www.prisma.io/docs/postgres/npx-create-db) creates a temporary [Prisma Postgres](https://www.prisma.io/docs/postgres) database in seconds, without signing up. To host the app, you can deploy it on [Prisma Compute](https://www.prisma.io/docs/compute). A `create-db` database is deleted after 24 hours unless you claim it, which needs a Prisma account. The Prisma CLI deploys apps to Prisma Compute with [Prisma Composer](https://www.prisma.io/docs/composer). Prisma Compute does not currently support WebSocket servers and has no multi-region deployments ([limitations](https://www.prisma.io/docs/compute/limitations)). Prisma Postgres has no point-in-time recovery yet; it is coming in November 2026 ([backups](https://www.prisma.io/docs/postgres/database/backups)). ## Databases that are coming [#databases-that-are-coming] MySQL has an early preview that runs migrations and reads and writes data, and MariaDB one that runs migrations. Microsoft SQL Server and CockroachDB have no Prisma ORM 8 library yet, and MariaDB has no client yet. To stay on a supported path for those databases today, use [Prisma ORM 7](https://www.prisma.io/docs/orm/v7/reference/supported-databases), which supports all of them. Add a 👍 to the GitHub issue for the database you need, or open one if there is none, because the number of reactions is one of the inputs to what gets built next. Organizations that need a database sooner can talk to [Prisma enterprise support](https://www.prisma.io/enterprise). Because a database library is an extension, a community package can add a database Prisma does not ship. If you publish one, [submit it to the directory](https://www.prisma.io/extensions/submit) and name the database it adds in the submission. ## Next steps [#next-steps] - The quickstart sets up a project on [PostgreSQL](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql) or [MongoDB](https://www.prisma.io/docs/prisma-orm/quickstart/mongodb). - [Release status](https://www.prisma.io/docs/orm/release-status) covers versions, dates, and staying on Prisma ORM 7. - [Supported versions](https://www.prisma.io/docs/orm/supported-versions) has the Node.js, database, and TypeScript floors. - [Prisma ORM 7 supported databases](https://www.prisma.io/docs/orm/v7/reference/supported-databases) has the full matrix for the current generally available release. - [Extensions](https://www.prisma.io/docs/orm/extensions) lists what you can add to PostgreSQL. ## Related pages - [Coming from Prisma ORM 7](https://www.prisma.io/docs/orm/coming-from-prisma-orm-7): What each Prisma ORM 7 schema attribute, command, and query is called in Prisma ORM 8, and what is not available. - [Core concepts](https://www.prisma.io/docs/orm/core-concepts): How Prisma ORM 8 fits together, in the order you meet each piece: the contract, the files contract emit writes, the database signature, queries, and migrations. - [Extensions](https://www.prisma.io/docs/orm/extensions): Every package that plugs into Prisma ORM: database packages, column types, indexes, query operations, and middleware, by Prisma and the community. - [Overview](https://www.prisma.io/docs/orm/data-modeling): Describe the data your application needs with models, primary keys, scalar fields, and relations. - [Prisma 7](https://www.prisma.io/docs/orm/v7): Prisma ORM is a next-generation Node.js and TypeScript ORM that provides type-safe database access, migrations, and a visual data editor.