> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About the Wix Data Ecosystem

## Article: About the Wix Data Ecosystem

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/about-the-wix-data-ecosystem.md

## Article Content:

# About the Wix Data Ecosystem

Wix Data is the data layer of a Studio Two site. It stores the site's structured content, displays that content on pages, and lets site code read and write it.

The Wix Data ecosystem consists of the following components:

- **CMS**: The built-in database that stores a site's collections.
- **External databases**: Databases outside Wix that you connect to a site, so their tables work like CMS collections.
- **CMS Data Sources**: Logical components that Wix creates for each collection, so you can connect page elements to collection data.
- **Dynamic pages**: Pages that display a collection's items. Each page shows either one item per URL or a list of items in a repeater.
- **Data API**: The `@wix/data` package, for working with data in site code.

## CMS

The Wix CMS is a document database that Wix optimizes for website content. It's globally replicated to be performant from all regions, secure, and fully managed by Wix.

The CMS stores any data a site needs, from simple content like form submissions to structured data like course materials or property listings. It also stores the data of Wix business solutions, such as Wix Stores and Wix Bookings, in [app collections](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/about-collections.md#app-collections). You work with your own data and business solution data using the same tools and APIs.

Learn more about [collections](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/about-collections.md) and [collection fields](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/about-collection-fields.md).

## External databases

When a site needs a particular database technology, or data that already lives in another system, you can connect an [external database](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/external-databases/about-external-databases.md) to your site. An adapter translates requests between Wix Data and the database. The database's tables then appear as collections, and you can use them with the same Data API, Data Sources, and dynamic pages as CMS collections.

To decide between the CMS and an external database, see [Choose Your Database](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/choose-your-database.md).

## CMS Data Sources

A CMS Data Source shares a collection's items with the elements on a page or section, so you can display collection data without writing code. For each collection, Wix creates CMS Data Sources that you connect elements to with **Connect to Data** in the Studio Two editor.

Learn more about [CMS Data Sources](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-cms-data-sources.md).

## Dynamic pages

A dynamic page displays a collection's items with a layout that you design once. An item page shows one item per URL. For example, a single listing page can show every property in a `Listings` collection, each on its own URL. A page with a repeater lists several items on one URL. Elements on these pages get their data from a CMS Data Source.

Learn more about [dynamic pages](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-dynamic-pages.md).

## Data API

The Data API gives site code direct access to collections. Use it to query, add, update, and remove items, run aggregations, and manage collections and indexes.

Learn more about [the Data API](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-the-data-api.md). To compare it with connecting elements, see [Connect to Data vs. the Data API](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/connect-to-data-vs-the-data-api.md).

### Data events

Data events let backend code respond after an item is created, updated, or deleted in a collection that a Wix user created on the site, for example to notify a team or update a related collection. 

Studio Two doesn't support data hooks. Data events are the closest alternative, but they run only after a change is saved, so they can't validate or block it.

Learn more about [data events](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-data-events.md).

## Where you work with data

The following table shows where you can work with a site's data, and what you'd do in each place:

| Where | What it is | Examples |
|---|---|---|
| The CMS dashboard | In the site dashboard, or from the **CMS** button in the Studio Two editor | Create a collection, edit items by hand, manage fields, permissions, and indexes |
| The Wix Data view, in the Code tab | A view for working with collections and running one-off scripts. See [About the Code Tab](https://dev.wix.com/docs/studio-two/get-started/about-the-code-tab.md#work-with-collections) | [Create a collection](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/create-a-collection.md), [copy collection and field IDs](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/introduction/find-collection-and-field-ids.md), [try a query or run a one-off change](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/query-items.md#try-a-query-in-a-wix-data-script) |
| The Studio Two editor | Where you connect page elements to collection data | [Display items on a page](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/display-collection-items.md) with Connect to Data |
| Site code | Code that uses the Data API while the site runs | [Read and write data](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-the-data-api.md) while the site runs |

## Quotas and limits

Wix Data has limits to keep sites fast and reliable. These include limits on storage, request time, API request rates, and the number of collections and items. Some limits depend on the site's plan. 

For example, a query returns at most 1000 items per page, and a bulk method accepts up to 1000 items per call. A site can have up to 1,000 collections. For the item size limit and other limits, see [About the Wix Data APIs](https://dev.wix.com/docs/api-reference/business-solutions/cms/introduction?apiView=SDK.md). To check a site's data usage and limits in code, use the [Site Data Usage API](https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/site-data-usage/introduction?apiView=SDK.md).

To see how much storage a site's collections use, open **Developer Tools > Monitoring** in the site dashboard and select **CMS collection storage**. Learn more about [Developer Tools](https://dev.wix.com/docs/studio-two/get-started/about-the-code-tab.md#developer-tools).

## How Studio Two differs from other Wix editors

If you've worked with data in Wix Studio or the Classic Editor, some features work differently in Studio Two. The following table shows what to use instead:

| In Wix Studio and the Classic Editor | In Studio Two |
|---|---|
| Datasets, which can read and write data | [CMS Data Sources](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-cms-data-sources.md), which only display data. To write data, use the Data API. |
| `$w` page code that sets element values | **Connect to Data**, or code in an Editor React Component (ERC) or a custom Data Source. Studio Two has no `$w` API. |
| Data hooks, such as `beforeInsert` | Not supported. To validate data, check it in backend code before you call the Data API, and set the collection's permissions so visitors can't write to it directly. To respond after a change, use [data events](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-data-events.md). |
| Routers and router hooks | Not supported. Use [dynamic pages](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-dynamic-pages.md). |
| The Velo `wix-data` API | The [`@wix/data`](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-the-data-api.md) package, which is preinstalled. |

## See also

- [About CMS Data Sources](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-cms-data-sources.md)
- [About the Data API](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-api/about-the-data-api.md)
- [About External Databases](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/external-databases/about-external-databases.md)
- [About the Code Tab](https://dev.wix.com/docs/studio-two/get-started/about-the-code-tab.md)
- [Compare Extending Websites in Studio Two to Wix Editor and Wix Studio](https://dev.wix.com/docs/studio-two/get-started/compare-extending-websites-in-studio-two-to-wix-editor-and-wix-studio.md)