# Prisma Next API reference (/docs/orm/next/reference)

> 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.

Reference index for the Prisma Next ORM client, SQL query builder, pipeline builder, raw queries, and runtime APIs.

Location: ORM > Next > Prisma Next API reference

Prisma Next has three query surfaces. The **ORM client** gives you model-level methods like `where()`, `create()`, and `include()`, and works against both PostgreSQL and MongoDB. The **SQL query builder** gives you table-level, SQL-shaped methods like `select()`, `innerJoin()`, and `groupBy()`, and today targets PostgreSQL only. The **pipeline builder** gives you a typed way to build MongoDB aggregation pipelines through `db.query`.

Use the ORM client for everyday application queries across models and relations. Reach for the SQL query builder when you need a join, aggregate, or SQL feature the ORM client doesn't expose on PostgreSQL, and the pipeline builder for MongoDB aggregation pipelines. When even those can't express a query, drop to a [raw query](https://www.prisma.io/docs/orm/next/reference/raw-queries); for client lifecycle, transactions, and prepared statements, see [Transactions and runtime](https://www.prisma.io/docs/orm/next/reference/transactions-and-runtime).

## How database differences are documented [#how-database-differences-are-documented]

The method reference pages document each method with the classic Remarks / Options / Return type / Examples structure (the raw queries page is deliberately more narrative). When a method's behavior differs between PostgreSQL and MongoDB, exists on only one database, or is type-checked but not enforced at runtime, the method's own Remarks call that out inline.

For a conceptual walkthrough of reading, writing, and querying data (rather than an exhaustive method-by-method reference), see the [Fundamentals](https://www.prisma.io/docs/orm/next/fundamentals/reading-data) section:

* [Reading data](https://www.prisma.io/docs/orm/next/fundamentals/reading-data)
* [Writing data](https://www.prisma.io/docs/orm/next/fundamentals/writing-data)
* [Relations and joins](https://www.prisma.io/docs/orm/next/fundamentals/relations-and-joins)
* [Transactions](https://www.prisma.io/docs/orm/next/fundamentals/transactions)
* [Advanced queries](https://www.prisma.io/docs/orm/next/fundamentals/advanced-queries)

- [ORM client reference](https://www.prisma.io/docs/orm/next/reference/orm-client): Every ORM client method, with PostgreSQL and MongoDB behavior documented side by side.

- [SQL query builder reference](https://www.prisma.io/docs/orm/next/reference/sql-query-builder): Every SQL query builder method for building typed, table-level queries against PostgreSQL.

- [Pipeline builder reference](https://www.prisma.io/docs/orm/next/reference/pipeline-builder): Every MongoDB pipeline-builder stage, accumulator, expression helper, and write terminal.

- [Raw queries reference](https://www.prisma.io/docs/orm/next/reference/raw-queries): Raw escape hatches: PostgreSQL raw SQL fragments and MongoDB raw commands.

- [Transactions and runtime reference](https://www.prisma.io/docs/orm/next/reference/transactions-and-runtime): Client lifecycle, transactions, prepared statements, and execution options.

## Related pages

- [`Overview`](https://www.prisma.io/docs/orm/next/data-modeling): Describe the data your application needs with models, primary keys, scalar fields, and relations.