Skip to content

Schema

A Schema defines all of the different Item Types, Object Types, and Enums that make up your data model. The definition for these lives in your code repository as TypeScript files, but you must publish your schema to StatelyDB so your Stores can use them.

A Schema lives in your Organization, and you can have multiple Schemas. Each Schema may be bound to one or more stores - for example, you can share one schema between your development and production Store.

Schemas have multiple versions - this one of the big differences between Elastic Schema and traditional schemas. In other databases, if they have a schema at all, there is only one active definition for the database’s schema. In contrast, in StatelyDB all versions of your schema are “active” at once - older clients built from earlier schema versions see the database in terms of that earlier schema version.