# Using the WebUI — tables (`/database`)

**Any screen not listed here does not exist.** Headings quote the screen's own wording.

**Part of the workspace guide. Other topics:**
conversations, the input box, and sign-in: `references/webui.md`;
documents, files, tables, memory, channels, and apps: `references/webui-workspace.md`;
editing a file in place (「編集」): `references/webui-file-edit.md`;
SIROE pages, blocks, and boards: `references/webui-siroe.md`;
settings, administration, models, and triggers: `references/webui-settings.md`;
external service connections: `references/webui-connections.md`;
`/office`: `references/webui-office.md`;
`/meetings`: `references/webui-meetings.md`;
`/calendar`: `references/webui-calendar.md`.

## 「データ」 — tables

| Where | What you can do |
| --- | --- |
| `/database` | The list of tables. `/database/<表名>` is one table. The actual store of business data, also read and written from conversations. Visibility can be changed from the tag next to the table name in the table detail (only by people who can write; others see the tag only). Everyone in the level it is shared with can read and write it. **Publishing an app that only adds rows (a form or survey) lets visitors add rows but not read them** — the table detail says 「公開ページから、未サインインの訪問者が行を追加できます。訪問者は行を閲覧できません。」 and its level stays; a published app that reads the table lets visitors read it too. **The table detail has 2 tabs, 「データ」 and 「SQL」** — the SQL tab accepts `INSERT` / `UPDATE` / `DELETE` as well as `SELECT` (table names take a `d_` prefix; writes run after confirming the affected row count; creating or dropping tables and adding columns are screen-only). **Tables can be given labels** in the table detail (only by people who can write; read-only users see the reason; new labels can be typed on the spot; the agent never labels). **The 「ラベル」 column left of the list (chips above it on a narrow screen) filters by one label**, with 「すべてのテーブル」, each label's count, and 「ゴミ箱」 (`?label=<ラベル名>` opens directly). **Each row shows its origin** (「手で作成」 / 「ファイルインポート」 / 「エージェント」 / 「SIROE のタスクボード」 — a siroe board adds a 「カード」 table), filterable with `?source=siroe`; older tables show none. **The table detail's 「…」 (「その他の操作」) has 「CSV でエクスポート」 and 「Excel(.xlsx)でエクスポート」, which download all rows** (also for read-only tables; headers are the on-screen names; CSV opens in Excel without garbling, and values starting with `=` get a leading `'`; Excel cuts cells over 32,767 characters and counts them on a 「注意」 sheet; recorded in the audit log). **「ファイルからインポート」 in the same 「…」 adds rows from CSV or Excel (.xlsx) to that table** (only people who can write. For Excel with multiple sheets, you choose one. Headers in row 1 are matched to columns by display name or identifier, and unmatched headers are shown as 「インポートしない」. **Rows go in chunks; a failing chunk stops it** (earlier rows stay) and shows which rows fail and why. CSV up to 64 MiB, Excel 2 MiB. An exported file can be imported back as is). **The list can also be filtered by search term** (matches table name, display name, description, and labels, combined with the label and origin filters. Kept in the URL as `?q=`). **People who can write edit the icon, display name, and description** with 「表示名を変更」 / 「説明を変更」 / 「アイコンを変更」 in the table detail's 「…」 (icons come from a fixed set; an empty description removes it). **Each list row's 「…」 (or a right-click) offers the same plus 「開く」 / 「ラベルを変更」 / 「テーブルを削除」** (disabled with the reason where you cannot write). **Check rows in the list and press 「まとめて削除」 to move several tables to the trash** (tables you cannot write and the 「カード」 table stay; the confirmation says how many). **The agent also sets an icon when creating a table** (chat then shows an 「開く」 card). **Cells are edited in place in the 「データ」 tab** (people who can write): click a cell, Enter saves, Esc cancels, **Tab / Shift+Tab saves and moves to the next / previous cell** (wrapping to the next row). Headers show a type icon; numbers are right-aligned. **A row's delete button and a column's settings button appear on hover or keyboard focus** (always on touch screens); deleting a row takes two presses. **To delete several rows, check them at the left and press 「まとめて削除」** (rows do not go to the trash and cannot be restored). On a narrow screen the 「ゴミ箱」 above the list is an icon-only button |

Tables are created from **「テーブルを作成」** in `/database` — **pressing it creates 「無題のテーブル」 right away** (one text column 「名前」, visible only to you; change it with the visibility tag next to the title) and opens it with the title ready to type (click the title later to rename it).
**Columns are added from 「列を追加」 at the right end of the table's header row** — enter only the column name and its type; the identifier used in SQL is assigned automatically (`col_1`, `col_2`, …), or open 「詳しく」 to choose it yourself (lowercase letters, digits and `_`; **it cannot be changed later**). A column name that already exists in the table is refused. **A column's name, type, and 「必須」 are changed from the small button next to its name in the header** (the identifier is shown there, read only) — a type change goes through only when every current value converts (text `12` → number works; `abc` does not), otherwise it is refused with the count and an example, and nothing changes. Checking 「必須」 goes through only when no row has that column empty; otherwise it is refused with the number of empty rows. A task board table's columns cannot change type or 「必須」, and a column cannot be made 「必須」 while an app uses the table or the table is synced from a file. File columns can switch type only while empty, and a type change is refused on tables over 50,000 rows. **The table's English name is shown next to the title, spelled as SQL uses it (with the `d_` prefix, e.g. `d_monthly_sales`; the list rows show it the same way), and can be changed only while the table is empty** (pencil button; you type the name without `d_`; not when approvals, triggers or apps already use the name) — pages that show the table follow the new name.

**Every row records who wrote it and through which route, and four of these can be shown as columns** — under 「自動で入る列」 at the bottom of 「列を追加」 you can add 作成者 (created by), 作成日時 (created at), 最終更新者 (last edited by) and 最終更新日時 (last edited at). They are filled in automatically on every write and cannot be edited by hand. A person column shows the member's name; when the row was not written from the screen, the route is shown next to it (エージェント, 外部の AI, アプリ, 入力フォーム, 取り込み, SQL), and a row sent from a public form shows only 入力フォーム. Hide one from 「非表示にする」 in the column header's menu — the record stays and the column can be shown again. Rows written before this was introduced show — in the person columns. In SQL they are `_created_by`, `_created_at`, `_updated_by`, `_updated_at` (plus `_created_via` / `_updated_via`), read only.

To build a table from a file, use **「ファイルから作成」** next to it (CSV or Excel (.xlsx); for Excel choose a sheet). **Fix each inferred column's identifier, display name, and type** first
(Japanese headers get identifiers like `column_1`), and enter the table's identifier (**half-width alphanumerics and `_`, starting with a lowercase letter, up to 48 characters**), display name,
an optional description and icon, and visibility. **Choose 「列とデータを作成」 or 「列だけ作成」**; with data, the table is created even if a row fails —
earlier chunks stay, and the failing rows and reasons are shown (fix the file and re-import with 「ファイルからインポート」 in the table's 「…」). **Column types are in English** (Text / Integer / Decimal / True/False / Date / JSON / File).
**Visibility can be chosen from the 4 levels** (「自分のみ」 / 「グループ」 / 「テナント全体」 / 「外部公開」) —
groups are limited to those you belong to, and 「外部公開」 is shown to members only under the same conditions as above.
**It can also be created by asking in chat, e.g. 「シフト表を作って」.**
**Widening it can be asked in chat too** (「この表をみんなに共有して」 → 「テナント全体」, or a group you belong to), after the approval card; a table cannot be published outside, returning it to only you can be asked in chat too, and other narrowing is on screen only.

**「同期して作成」 syncs a table from a source**: 「ファイル置き場から」 a CSV / .xlsx in `/files`; 「Google Sheets から」 a URL and range (`売上!A1:F1000`); 「Excel から」 a OneDrive / SharePoint workbook, then a sheet. Sheets and Excel need their 「連携」 connection and an interval (1 時間ごと / 6 時間ごと / 1 日ごと). Only the creator can read the new table; at most 20 Sheets + Excel syncs per workspace. **The source wins**: edits are replaced at the next sync. New columns are added; a removed or retyped column skips the sync. **5 failures in a row pause it** (「同期を止めています」), as do deleting the file, trashing the table, or losing the connection. The table screen shows the last sync; 「今すぐ同期」 resumes it. Chat can create one too: ask 「このスプレッドシートと同期する表を作って」 and approve the card.

**Only the 「カード」 table (`board_cards`) used by siroe boards cannot be deleted or have its visibility changed, even by administrators** —
otherwise **kanban boards could never be created again** in that workspace. Rows, columns, and the display name stay editable, so
remove unwanted cards by **deleting rows**. If it was narrowed or deleted before this protection, 「カンバンを作成」 says it is hidden
from you or in the trash — ask someone who can see it to set it back to 「テナント全体」, or someone who can edit it to restore it.

Each table row in `/database` shows its storage (a bar appears only near the limit). Tenant-wide storage: `/settings/usage`.
