Discussion about using Sanity.io as a backend solution for small projects and its features

63 replies
Last updated: Nov 29, 2025
Can anyone explain me if a Dataset is like a database or like a table?
AI Update

Good question! A dataset in Sanity is more like a database than a table.

Think of it this way:

  • A dataset is a container that holds all of your content documents, similar to how a database contains multiple tables
  • Within a dataset, you have different document types (like "post", "author", "product"), which are more analogous to tables in a traditional database
  • Each document type can have many individual documents (records)

For example, if you have a blog, you might have:

  • One dataset called "production"
  • Inside that dataset: document types like post, author, category
  • Multiple documents of each type (many blog posts, several authors, etc.)

Datasets in Sanity are particularly useful for separating environments. Many teams create multiple datasets within a single project:

  • production - your live content
  • staging - for testing changes
  • development - for local development

Each dataset is completely isolated from the others, just like separate databases would be. They can have the same schema (document types) but contain different content.

On the Enterprise plan, Sanity even offers Advanced Dataset Management features like Cloud Clone (copy entire datasets) and Hot Swap (switch between datasets using aliases), which further reinforces that datasets are database-level constructs rather than table-level.

So in summary: Dataset = Database, Document Type = Table, Document = Row/Record.

Show original thread
63 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?