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

# Tables

> Create tables in Rey's built-in database — name your table, set permissions, and define the fields that describe each entry.

Tables are the containers for your app's data. Each table stores **entries** (records) that share the same set of **fields** (typed columns). This page walks through creating one from scratch.

## Create a new table

**1. Open the Data panel**

Click the **database icon** in the top toolbar to open the Data panel.

**2. Click New table**

At the bottom of the panel, click **+ New table**. The New table dialog opens.

**3. Name your table**

Enter a descriptive name (e.g., `Tasks`, `Products`, `Posts`).

**4. Choose a permission model**

Pick one of the four permission modes (see [Permissions](#permissions) below).

**5. Add fields**

Every table starts with a **Name** text field. Click **Add field** to add more, choose a type, and give each one a name.

**6. Save**

Click **Save**. Your table is created and available to bind to components.

![New table dialog with name, permissioning, and fields](https://mintcdn.com/rey-62fd4809/CynDnVly-UPIE_RC/images/data/new-table.png?fit=max\&auto=format\&n=CynDnVly-UPIE_RC\&q=85\&s=d15590483b579c33ac940dbb66e5c030)

## Permissions

Permissions control who can create, edit, and view entries at runtime in your live app. Pick the mode that matches how the data is meant to be used.

> [accordion] Admin
>
> **Only you can create and manage entries, while everyone can view them.**
>
> Ideal for delivering content such as news, blog posts, or products.

> [accordion] Private
>
> **Users privately create, view, and manage their own entries.**
>
> Works well for personal data such as tasks, personal notes, or habit trackers.

> [accordion] Shared
>
> **Users create and manage their own entries while everyone can view them.**
>
> Great for community-driven content like forums or recipe sharing.

> [accordion] Public
>
> **Everyone can create, edit, and view any entry.**
>
> Use this for open collaboration, such as brainstorming boards or shared to-do lists.

## Field types

When you add a field, pick the type that matches the shape of the data. The type controls the input Rey renders in the data grid and what you can bind to on the canvas.

![Field type dropdown showing Text, Rich text, Date, True/false, Multiple choice, Number, Image, Audio, Relation](https://mintcdn.com/rey-62fd4809/CynDnVly-UPIE_RC/images/data/field-types.png?fit=max\&auto=format\&n=CynDnVly-UPIE_RC\&q=85\&s=8e3ce4530e3d4f3105d0c98d0cb19611)

| Type | Use for |
| - | - |
| **Text** | Names, descriptions, labels, URLs, and other freeform strings. |
| **Rich text** | Long-form content with formatting — headings, bold, links, lists. |
| **Date** | A date or date-and-time value. Rey renders a date picker. |
| **True / false** | Boolean flags like `Is active`, `Completed`, or `In stock`. |
| **Multiple choice** | A fixed set of options (e.g., `Draft`, `Published`, `Archived`). |
| **Number** | Integers and decimals — prices, counts, ratings. |
| **Image** | An uploaded image. Bind to an Image component to render it. |
| **Audio** | An uploaded audio file. Bind to an audio player component. |
| **Relation** | A link to an entry in another table (e.g., each `Order` links to a `Customer`). |

## Edit a table later

You can rename a table, change its permissions, or add and remove fields at any time from the Data panel. Setup changes are promoted to the live app the next time you publish — see [Data overview](https://docs.reyapp.io/data/database.md) for how edit mode interacts with your published app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.