# Tables_

Organize your data with Appwrite Tables. Explore how to create and configure tables to store and structure your data effectively.

4 min read

Appwrite uses tables as containers of rows. Each tables contains many rows identical in structure. The terms tables and rows are used because the Appwrite JSON REST API resembles the API of a traditional NoSQL database, making it intuitive and user-friendly, even though Appwrite uses SQL under the hood.

That said, Appwrite is designed to support both SQL and NoSQL database adapters like MariaDB, MySQL, or MongoDB in future versions.

## Create table

You can create tables using the Appwrite Console, a [Server SDK](/docs/sdks#server), or using the [CLI](/docs/tooling/command-line/installation).

You can create a table by heading to the **Databases** page, navigate to a [database](/docs/products/databases/databases), and click **Create table**.

AI suggestions

Enable **AI suggestions** to generate columns and indexes based on your table name and existing database structure. [Learn more about AI suggestions](/docs/products/databases/ai-suggestions).

Appwrite uses permissions to control data access. For security, only users that are granted permissions can access a resource. This helps prevent accidental data leaks by forcing you to make more conscious decisions around permissions.

By default, Appwrite doesn't grant permissions to any users when a new table is created. This means users can't create new rows or read, update, and delete existing rows.

## Columns

All rows in a table follow the same structure. Columns are used to define the structure of your rows and help the Appwrite's API validate your users' input. Add your first column by clicking the **Add column** button.

You can choose between the following types.

| Column | Description |
|---|---|
| `varchar` | Short text column. Fully indexable if size < 768. Maximum 16,383 characters. |
| `text` | Text column. Prefix indexing only. Maximum 16,383 characters. |
| `mediumtext` | Text column. Prefix indexing only. Maximum 4,194,303 characters. |
| `longtext` | Text column. Prefix indexing only. Maximum 1,073,741,823 characters. |
| `integer` | Integer column. 32-bit signed, range -2,147,483,648 to 2,147,483,647. |
| `bigint` | Big integer column. 64-bit signed, range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Ideal for timestamps, large counters, or IDs that exceed 32-bit limits. |
| `float` | Float column. |
| `boolean` | Boolean column. |
| `datetime` | Datetime column formatted as an ISO 8601 string. |
| `enum` | Enum column. |
| `ip` | IP address column for IPv4 and IPv6. |
| `email` | Email address column. |
| `url` | URL column. |
| `point` | Geographic point specified as `[longitude, latitude]`. |
| `line` | Geographic line represented by an ordered list of coordinates. |
| `polygon` | Geographic polygon representing a closed area; supports interior holes. |
| `relationship` | Relationship column relates one table to another. [Learn more about relationships.](/docs/products/databases/relationships) |
| `string` | **Deprecated.** Use `varchar`, `text`, `mediumtext`, or `longtext` instead. |

If an column must be populated in all rows, set it as `required`. If not, you may optionally set a default value. Additionally, decide if the column should be a single value or an array of values.

If needed, you can change an column's key, default value, size (for text columns), and whether it is required or not after creation.

You can increase a varchar column's size without any restrictions. When decreasing size, you must ensure that your existing data is less than or equal to the new size, or the operation will fail.

## Indexes

Databases use indexes to quickly locate data without having to search through every row for matches. To ensure the best performance, Appwrite recommends an index for every column queried. If you plan to query multiple columns in a single query, creating an index with **all** queried columns will yield optimal performance.

The following indexes are currently supported:

| Type | Description |
|---|---|
| `key` | Plain Index to allow queries. |
| `unique` | Unique Index to disallow duplicates. |
| `fulltext` | For searching within text columns. Required for the [search query method](/docs/products/databases/queries#query-class). |

You can create an index by navigating to your table's **Indexes** tab or by using your favorite [Server SDK](/docs/sdks#server).

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.