> ## Documentation Index
> Fetch the complete documentation index at: https://developers.zite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases

> Every workspace is backed by one Zite database — tables, fields, records, and views that all its apps share.

The database is relational, with a spreadsheet-friendly field model: tables of records, where each field has
a type — text, number, select, date, linked record, formula, and more.

## Tables, fields, and records

* **Tables** hold records of one kind (Customers, Tickets, Invoices).
* **Fields** are the typed columns on a table. The first field is the table's **primary field**.
* **Records** are the rows.
* **Views** are saved filters, sorts, and field arrangements over a table.

Zite supports rich field types — text, number, currency, percent, rating, duration, single/multiple
select, date, datetime, checkbox, attachments, email, url, phone, **linked records** (relationships
between tables), **lookups** and **rollups** (values pulled or aggregated across a relationship), and
**formulas** (computed values). See the full [Field types](/api/field-types) reference.

<Note>
  Some field types are computed or system-managed — `formula`, `rollup`, `created_at`, `updated_at`,
  `updated_by`, and `user`. They're maintained by the platform, so they're read-only from your code
  and can't be set directly.
</Note>

## SDK names

In your apps, tables and fields are addressed by **SDK names**, not their display labels:

* **Tables** use PascalCase (`Tickets`, `SupportTickets`).
* **Fields** use camelCase (`dueDate`, `assigneeEmail`).

SDK names are stable — renaming a table or field in the UI does not change its SDK name — so your code
keeps working. You'll see them in the generated `.zite/db.ts` for each workspace. See the
[database client](/framework/database-client).

## How apps use the database

The frontend never talks to the database directly. Reads and writes run inside backend
[workflows](/concepts/workflows), which use a typed client generated from the schema:

```typescript theme={null}
// in a workflow — apps/<name>/src/api/listOpenTickets.ts
import { zite } from 'zitejs/db';

const open = await zite.Tickets.findAll({ filter: { status: 'open' } });
```

The React frontend reaches this data by calling that workflow through a generated, typed caller — it
never queries the database itself. For counts, joins, and aggregates, workflows use read-only SQL with
human-readable names via `zite.sql()`. Both the client and `zite.sql()` are covered in the
[database client](/framework/database-client) reference.

## Editing the schema

You can change the schema from the database UI in the [dashboard](https://app.zite.com), or ask an agent
to do it through the [Zite MCP](/mcp/overview) (`create_table`, `create_field`, and friends). You can also
manage tables, fields, and records programmatically with the [Database API](/api/overview).
