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

# Database

> Design custom databases for your IoT devices to store runtime data.

The **Database** tab (Monitor → Database) lets you design custom databases for
your product's devices to store runtime data — readings, events, logs, anything
your devices produce.

## Schemas and tables

* Create a **schema** for the product, then add **tables** within it
* Each table defines **columns** (the fields a record holds)
* Devices and dashboards read and write records against these tables

## Writing and reading data

| From               | How                                                                                                                     |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Firmware (Arduino) | `insertDatainDatabase(...)`, `getDatabaseData(...)` — see the [API reference](/firmware/arduino/api-reference#database) |
| Dashboard script   | [`db.query`](/script/database-api) / `db.insert`                                                                        |
| REST               | The [Database API](/api/database) endpoints                                                                             |
| Dashboard widgets  | The **Database Form** control writes; **Table** / **Dynamic Repeater** display                                          |

## Typical flow

<Steps>
  <Step title="Create a table">
    Define its columns (e.g. `temperature`, `humidity`, `created_at`).
  </Step>

  <Step title="Write from the device">
    Insert a record whenever the device produces data.
  </Step>

  <Step title="Show it">
    Bind a Table or Dynamic Repeater widget to the table, or query it in a script.
  </Step>
</Steps>

<Card title="Next: SMS" icon="message" href="/studio/sms">
  Send SMS notifications from your product.
</Card>
