> For the complete documentation index, see [llms.txt](https://docs.informationhub.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.informationhub.io/project/tables.md).

# Tables

Tables are where your structured data lives in Information Hub. Each table stores data in rows and columns, much like a spreadsheet - but with defined column types that keep your data consistent and reliable.

<figure><img src="/files/9CQyyF4NNbycWlSnq1JW" alt="The tables page"><figcaption><p>The tables page</p></figcaption></figure>

## What tables are used for

Every project can have multiple tables. Tables are the backbone of your project's data:

* **Forms** collect data and write it directly into tables.
* **Dashboards** visualise data stored in tables.
* **Apps** can read from and write to tables.

## Column data types

Each column in a table has a data type that controls what values it can hold:

| Data Type        | Description                                                                                                                       |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Text             | Free text of any length                                                                                                           |
| Integer          | Whole numbers                                                                                                                     |
| Double Precision | Decimal numbers (high precision)                                                                                                  |
| Real             | Decimal numbers (standard precision)                                                                                              |
| Yes/No           | Boolean true/false values                                                                                                         |
| File             | Reference to a file in project storage                                                                                            |
| Dropdown         | Select from a predefined list of options                                                                                          |
| Foreign Key      | Reference to a row in another table                                                                                               |
| Lookup           | References a specific column in another table - similar to a foreign key but with a search interface for finding the linked value |
| JSON             | Stores structured JSON data within a single cell                                                                                  |
| Tabular          | Stores multiple rows of structured data within a single cell                                                                      |

Every table also has a **primary key** column. By default this is an auto-incrementing integer called `id` that uniquely identifies each row. If you need human-readable IDs (such as `SP-1` or `OBS-42`) you can use a key generator on the primary key column instead - see Key generators below.

## Key generators

A key generator is a template-based pattern for auto-generating column values. Use them for serial numbers, sample IDs, specimen codes, or any value that should follow a consistent format. For example, a template of `SP-{autoincrement}` would produce SP-1, SP-2, SP-3, and so on.

{% hint style="info" %}
Key generators produce string values. If your template includes literal text (for example `SP-{autoincrement}`), the primary key column type must be **Text**, not **Integer**. Open **Edit Column** on the primary key column and change its type to Text before assigning the generator.
{% endhint %}

Key generators are managed from the table's Settings page. You can assign a key generator to a column when adding or editing that column.

## In this section

{% content-ref url="/pages/idvYHsokWigDwYI8qMlc" %}
[Create a Table](/project/tables/create-table.md)
{% endcontent-ref %}

{% content-ref url="/pages/CmYaPVOX7q3wK4WW62ch" %}
[Import Data](/project/tables/import-data.md)
{% endcontent-ref %}

{% content-ref url="/pages/kI3oquG6j4oqFuLy89Wj" %}
[View and Edit Data](/project/tables/view-edit-data.md)
{% endcontent-ref %}

{% content-ref url="/pages/Es3jIurUm97s2olWpb1Q" %}
[Export Data](/project/tables/export-data.md)
{% endcontent-ref %}

{% content-ref url="/pages/3j9uACxLtiO5DAhxQelb" %}
[Analyse Data](/project/tables/analyse-data.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.informationhub.io/project/tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
