---
id: "xata"
type: "component"
kind: "sql-database"
provider: "default"
category: "data"
docs: "https://xata.io/docs"
url: "https://localhost:3000/catalogue/components/xata"
---

# Xata

Managed Postgres platform with copy-on-write branches and anonymized clones.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [SQL database](https://localhost:3000/catalogue/kinds/sql-database) |
| Category | Data |
| Official docs | [https://xata.io/docs](https://xata.io/docs) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `anonymization` | boolean | — | no | false | inherited |
| `appendOnly` (advanced) | boolean | — | no | false | inherited |
| `backupEnabled` | boolean | — | no | false | inherited |
| `backupRetentionDays` | integer | — | no | — | inherited |
| `cloudProvider` | enum | `aws`, `gcp`, `azure` | no | — | inherited |
| `commitProtocol` (advanced) | enum | `single`, `two-phase` | no | "single" | inherited |
| `concurrencyControl` (advanced) | enum | `pessimistic`, `optimistic`, `constraint` | no | — | inherited |
| `distributed` | boolean | — | no | false | inherited |
| `encryptionAtRest` | boolean | — | no | false | inherited |
| `idEncodesShard` (advanced) | boolean | — | no | false | inherited |
| `instances` | integer | — | no | — | inherited |
| `managed` | boolean | — | no | false | **true** |
| `multiWriter` | boolean | — | no | false | inherited |
| `replicaFanout` (advanced) | integer | — | no | — | inherited |
| `replicaOf` | ref | — | no | — | inherited |
| `replication` | enum | `none`, `async`, `sync` | no | "none" | inherited |
| `shardKey` | string | — | no | — | inherited |
| `sharded` | boolean | — | no | false | inherited |

Bold values are the ones this component pins.

## Rules that apply · 6

### Database updates not propagated to the search index `business-updates-without-index-propagation` (warning)

- Page: https://localhost:3000/catalogue/rules/business-updates-without-index-propagation.md
- Why: Application servers write this database and the design keeps a search index, but nothing captures the database's changes. The index then depends on the application writing to both places, and the two drift apart silently.
- Applies to: every node of kind sql-database
- Message: Database '{{node.id}}' is written by application servers and the design has a search index, but no change-data-capture propagates its updates. Index writes rely on dual writes.

It fires when:

- all of these hold:
  - the node has at least one synchronous incoming edge from an app-server
  - the design contains a node of kind search-index
  - this does not hold:
    - the node has at least one outgoing edge to a change-data-capture

### Datastore without backup or retention `datastore-missing-backup` (error)

- Page: https://localhost:3000/catalogue/rules/datastore-missing-backup.md
- Why: A system of record with backups off, or with no retention period stated, cannot be restored. The loss is discovered on the day it matters.
- Applies to: every node of kind sql-database
- Message: Datastore '{{node.id}}' has no backup or no retention policy declared.

It fires when:

- any of these hold:
  - the node's `backupEnabled` is false
  - the node's `backupRetentionDays` has no value

### Single-region datastore behind a multi-region SLA `datastore-single-region` (error)

- Page: https://localhost:3000/catalogue/rules/datastore-single-region.md
- Why: The design promises multi-region availability, but this datastore sits in one region and does not replicate. A region outage takes the system of record with it.
- Applies to: every node of kind sql-database
- Message: Datastore '{{node.id}}' is single-region with no replication, but the design requires multi-region availability.

It fires when:

- all of these hold:
  - the design requirement `availability.multiRegion` is true
  - the node sits inside exactly 1 region group
  - the node's `replication` is "none"

### Read-heavy datastore without a cache `read-heavy-path-without-cache` (warning)

- Page: https://localhost:3000/catalogue/rules/read-heavy-path-without-cache.md
- Why: The design states a read-heavy workload and application servers read this datastore directly, yet the design has no cache anywhere. Every read pays a database round trip.
- Applies to: every node of kind sql-database or nosql-database
- Message: Datastore '{{node.id}}' serves a read-heavy workload directly from application servers and the design has no cache.

It fires when:

- all of these hold:
  - the design requirement `traffic.readWriteRatio` is a number greater than 10
  - the node has at least one synchronous incoming edge from an app-server
  - this does not hold:
    - the design contains a node of kind cache

### Read replicas as the only scaling `read-replica-as-sole-scaling` (warning)

- Page: https://localhost:3000/catalogue/rules/read-replica-as-sole-scaling.md
- Why: Asynchronous read replicas scale reads only. When the store is neither sharded nor distributed the writes still land on one primary, so the replicas add nothing at the declared peak.
- Applies to: every node of kind sql-database
- Message: Database '{{node.id}}' relies on async read replicas as its only scaling above 5000 rps. Replicas do not scale writes.

It fires when:

- all of these hold:
  - the node's `replication` is "async"
  - the node's `sharded` is false
  - the node's `distributed` is false
  - the node's declared requests per second is more than 5000

### Single-writer primary at peak QPS `single-writer-primary-at-peak-qps` (error)

- Page: https://localhost:3000/catalogue/rules/single-writer-primary-at-peak-qps.md
- Why: A single-writer, unsharded relational primary has a throughput ceiling. Declaring more than five thousand requests per second against it means the peak finds that ceiling in production.
- Applies to: every node of kind sql-database
- Message: Database '{{node.id}}' is a single unsharded writer declared at more than 5000 rps. Shard it or move to a multi-writer distributed store.

It fires when:

- all of these hold:
  - the node's `multiWriter` is false
  - the node's `sharded` is false
  - the node's declared requests per second is more than 5000

## Other products of the same kind · 75

- [ApsaraDB for OceanBase](https://localhost:3000/catalogue/components/alibaba-oceanbase.md) `alibaba-oceanbase` — alibabacloud
- [PolarDB](https://localhost:3000/catalogue/components/alibaba-polardb.md) `alibaba-polardb` — alibabacloud
- [PolarDB-X](https://localhost:3000/catalogue/components/alibaba-polardb-x.md) `alibaba-polardb-x` — alibabacloud
- [ApsaraDB RDS](https://localhost:3000/catalogue/components/alibaba-rds.md) `alibaba-rds` — alibabacloud
- [Amazon Aurora](https://localhost:3000/catalogue/components/aurora.md) `aurora` — aws
- [Amazon Aurora DSQL](https://localhost:3000/catalogue/components/aws-aurora-dsql.md) `aws-aurora-dsql` — aws
- [Oracle Database@AWS](https://localhost:3000/catalogue/components/aws-oracle-database.md) `aws-oracle-database` — aws
- [Amazon RDS](https://localhost:3000/catalogue/components/aws-rds.md) `aws-rds` — aws
- [Amazon RDS Custom](https://localhost:3000/catalogue/components/aws-rds-custom.md) `aws-rds-custom` — aws
- [Azure Database for MySQL](https://localhost:3000/catalogue/components/azure-database-for-mysql.md) `azure-database-for-mysql` — azure
- [Azure Database for PostgreSQL](https://localhost:3000/catalogue/components/azure-database-for-postgresql.md) `azure-database-for-postgresql` — azure
- [Azure HorizonDB](https://localhost:3000/catalogue/components/azure-horizondb.md) `azure-horizondb` — azure
- [Oracle AI Database@Azure](https://localhost:3000/catalogue/components/azure-oracle-database.md) `azure-oracle-database` — azure
- [Azure SQL Database](https://localhost:3000/catalogue/components/azure-sql.md) `azure-sql` — azure
- [Azure SQL Managed Instance](https://localhost:3000/catalogue/components/azure-sql-managed-instance.md) `azure-sql-managed-instance` — azure
- [SQL Server on Azure Virtual Machines](https://localhost:3000/catalogue/components/azure-sql-server-vm.md) `azure-sql-server-vm` — azure
- [Cloudflare D1](https://localhost:3000/catalogue/components/cloudflare-d1.md) `cloudflare-d1` — cloudflare
- [Citus](https://localhost:3000/catalogue/components/citus.md) `citus` — default
- [CockroachDB](https://localhost:3000/catalogue/components/cockroachdb.md) `cockroachdb` — default
- [CockroachDB Cloud](https://localhost:3000/catalogue/components/cockroachdb-cloud.md) `cockroachdb-cloud` — default
- [Datomic](https://localhost:3000/catalogue/components/datomic.md) `datomic` — default
- [IBM Db2](https://localhost:3000/catalogue/components/db2.md) `db2` — default
- [EDB Postgres Advanced Server](https://localhost:3000/catalogue/components/edb-postgres.md) `edb-postgres` — default
- [Claris FileMaker Server](https://localhost:3000/catalogue/components/filemaker.md) `filemaker` — default
- [Firebird](https://localhost:3000/catalogue/components/firebird.md) `firebird` — default
- [IBM Informix](https://localhost:3000/catalogue/components/informix.md) `informix` — default
- [Actian Ingres](https://localhost:3000/catalogue/components/ingres.md) `ingres` — default
- [InterBase](https://localhost:3000/catalogue/components/interbase.md) `interbase` — default
- [InterSystems IRIS](https://localhost:3000/catalogue/components/intersystems-iris.md) `intersystems-iris` — default
- [MariaDB Server](https://localhost:3000/catalogue/components/mariadb.md) `mariadb` — default
- [MySQL](https://localhost:3000/catalogue/components/mysql.md) `mysql` — default
- [Neon](https://localhost:3000/catalogue/components/neon.md) `neon` — default
- [OceanBase Database](https://localhost:3000/catalogue/components/oceanbase.md) `oceanbase` — default
- [Progress OpenEdge](https://localhost:3000/catalogue/components/openedge.md) `openedge` — default
- [Oracle Database](https://localhost:3000/catalogue/components/oracle-db.md) `oracle-db` — default
- [PlanetScale](https://localhost:3000/catalogue/components/planetscale.md) `planetscale` — default
- [PostGIS](https://localhost:3000/catalogue/components/postgis.md) `postgis` — default
- [PostgreSQL](https://localhost:3000/catalogue/components/postgres.md) `postgres` — default
- [Relational database](https://localhost:3000/catalogue/components/relational-database.md) `relational-database` — default
- [SAP Adaptive Server Enterprise](https://localhost:3000/catalogue/components/sap-ase.md) `sap-ase` — default
- and 35 more: https://localhost:3000/catalogue/kinds/sql-database.md

## Use it in a design

```yaml
nodes:
  - { id: "xata", component: "xata" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Xata: managed Postgres platform built around copy-on-write branches, controlled schema migrations
# and anonymized production clones, deployable on AWS, GCP or Azure (Xata "Documentation").
schemaVersion: "1"
type: "component"
id: "xata"
kind: "sql-database"
provider: "default"
docs: "https://xata.io/docs"
defaults:
  managed: true
properties:
  cloudProvider:
    type: "enum"
    values: ["aws", "gcp", "azure"]
  anonymization:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/xata
