Data model
In this section
Models
The data model definition part of the Prisma schema defines your application models (also called Prisma models). Models:
Relations
Indexes
Prisma ORM allows configuration of database indexes, unique constraints and primary key constraints. This is in General Availability in versions 4.0.0 and later. You can enable this with the extendedIndexes Preview feature in versions 3.5.0 and later.
Views
Database views allow you to name and store queries. In relational databases, views are stored SQL queries that might include columns in multiple tables, or calculated values such as aggregates. In MongoDB, views are queryable objects where the contents are defined by an aggregation pipeline on other collections.
Database mapping
The Prisma schema includes mechanisms that allow you to define names of certain database objects. You can:
Multi-schema
Overview
External tables
Overview
Unsupported database features
Not all database functions and features of Prisma ORM's supported databases have a Prisma Schema Language equivalent. Refer to the database features matrix for a complete list of supported features.
Table inheritance
Overview