DOCUMENTATION

Database

Last updated May 2026
Advanced Block
All plans

A full relational database embedded directly in a document. Rows, columns, multiple views, filters, sorts, cross-database relations, rollups, formulas, automations, and a Focus mode with a Pomodoro timer — all living alongside your other blocks with no separate app or sync required.

What it is

The Database block is a self-contained data layer. Each database has a name, a set of typed columns, an unlimited number of rows, and one or more views — each view is a different lens on the same underlying data. Adding a row in the Board view makes it appear immediately in the Table, Calendar, and Chart views.

Table view — project tracker
TaskStatusPriorityDue dateOwner
Redesign onboardingDoneHighJun 12Ezra
Fix Yjs sync bugIn progressCriticalJun 18Ezra
Write database docsIn reviewNormalJun 26Ezra

Adding a Database block

/ → Database
Type / on any empty paragraph, type database, press Enter. A new empty database is created inline.
Block palette
Click + on any block → scroll to Advanced → Database.
Connect existing
From the database block toolbar, click the database icon to connect to an existing database in your workspace instead of creating a new one.
Each database has a globally unique ID. Connecting to an existing database embeds the same data in a different document — changes in either location are reflected everywhere the database is embedded.

Column types

Every column has a type that controls how values are stored, displayed, and interacted with. Relation, rollup, and formula columns are computed or linked — they cannot be edited directly.

TypeCategoryDescription
textBasicSingle-line text. The first text column is the row title — it gets the peek and page controls.
numberBasicNumeric value. Supports decimals. Used as Y-axis source in Chart view.
selectBasicSingle-choice dropdown from a predefined option set. 8 color choices per option. Used as board group-by and calendar color.
multiselectBasicMultiple choices from the same option set. Options shown as colored badges.
dateBasicDate picker. Calendar view requires at least one date column.
checkboxBasicBoolean toggle. Rollup % Checked aggregation is available for checkbox columns.
urlBasicValidated URL. Renders as a clickable link in the row peek.
emailBasicEmail address. Includes a contact picker that searches document members and contacts.
relationComputedCross-database link. Creates a two-way connection between rows in different databases. Mirror relations reflect the inverse side automatically.
rollupComputedAggregates values from linked rows via a relation column. Supports filtered rollup — only rows matching a condition are included.
formulaComputedComputed value from an expression referencing other columns. Evaluated client-side via FormulaEngine.

Column settings

Click any column header to open the column menu. From there you can rename the column, change its type, reorder it, resize it, hide it from the current view, or delete it. Changing a column type preserves the raw cell values where possible.

Semantic role
Assign a named role (title, status, priority, due date, assignee, etc.) to a column so automations, Focus view, and other systems can discover it by intent rather than by name.
Column width
Drag the right edge of any column header to resize it. Width is stored per-column in the database schema, not per-view.
Hide column
Hides the column in the current view only. Hidden columns are listed in the column menu and can be re-shown at any time. Data is not affected.

Relations

A relation column links rows in this database to rows in another database (or the same one). Each link is stored as a join record — adding or removing a link toggles that record without modifying either row's data.

1
Add a relation column

Column menu → Add column → type Relation → pick the target database from the dropdown.

2
Link rows

Click a relation cell in any row. A search picker opens showing all rows in the target database. Click a row to toggle the link on or off. Multiple rows can be linked simultaneously.

3
Mirror relation (optional)

When creating the relation, check Mirror to create a corresponding read-only relation column in the target database that shows which rows link back.

Relation cells show linked row titles as blue chips. Clicking a chip does not navigate — click the row's peek icon instead to open the linked row.

Rollups

A rollup reads values from a column in linked rows (via a relation) and aggregates them into a single number per row.

AggregationDescription
countNumber of linked rows.
sumSum of a numeric column across linked rows.
avgAverage of a numeric column.
minMinimum value of a numeric column.
maxMaximum value of a numeric column.
% checkedPercentage of linked rows where a checkbox column is true.

Filtered rollup

A rollup can optionally filter which linked rows are included before aggregating. Set a filter column, operator, and value in the rollup column settings — only linked rows matching the condition count toward the result. Useful for aggregating only completed tasks, only high-priority items, and so on.

Formulas

Formula columns evaluate an expression against each row's cell values. Expressions reference columns by name using {} syntax and support arithmetic, comparison operators, and built-in functions via FormulaEngine. Results are computed client-side and re-evaluated whenever a referenced cell changes.

Formula columns are read-only and cannot be used as rollup targets or relation sources. Use them for derived metrics — profit margin, days remaining, weighted scores, and similar calculations.

Views

Every database starts with a Table view. Additional views can be added from the view tab bar — each is a named, independently-configured lens on the same rows. Views can be renamed or deleted (at least one must remain).

View tab bar
Table
Board
Gallery
Calendar
Chart
Focus

Table view

The default spreadsheet-style grid. Rows are displayed as horizontal records; columns are typed fields. Click any cell to edit it inline. The first text column shows row controls on hover — a peek icon (slide-in panel) and a full-page icon.

Click cell
Opens an inline editor for that cell. For select/multiselect, a dropdown picker appears.
Click row title
Enters inline edit mode for the row name.
Peek icon (□→)
Opens the row peek panel — a slide-in modal with the full block editor and a property panel showing all column values.
Arrow icon ↗
Navigates to the row's standalone full page in the editor.
Group by
In the table toolbar, pick any select column to group rows by its options. Each group is collapsible.
Add row
Click the + button at the bottom of the table, or press Enter on the last row.

Board view (Kanban)

Groups rows into vertical columns by a select column. Each column is color-coded by its option's color. Rows appear as cards showing the title and up to 3 additional fields.

Board view — grouped by Status
To do2
Write docs
Add tests
In progress1
Fix sync bug
Done2
Redesign onboarding
Deploy v2
Drag card
Drag a card to a different column to update the group-by column value for that row automatically.
Group by picker
If the database has more than one select column, a Group by dropdown appears above the board to switch which column drives the columns.
Edit icon
Hover a card to reveal the edit icon — opens the row peek panel.
Add card
The dashed + button at the bottom of each column adds a new row pre-filled with that column's option.

A 2–3 column card grid. Each card shows a color strip from the first select column, the row title, and up to 4 additional field values. Click any card to open the row peek. Useful for visual content inventories, portfolios, and product grids.

Calendar view

A monthly calendar that places rows on the date stored in a chosen date column. Up to 3 rows are shown per day cell; overflow shows a "+N more" count. Row pills are color-coded by the first select column.

Click a day
Adds a new row pre-filled with that date.
Click a row pill
Opens the row peek panel.
Date column picker
If the database has more than one date column, a selector appears above the calendar to choose which drives the placement.
← / → arrows
Navigate between months.

Chart view

Visualises the database as a Bar, Line, Area, or Pie chart. Configure the X axis (any column), Y axis (row count or sum of a numeric column), and an optional secondary Group by dimension for multi-series charts. A stats strip above the chart shows total rows, data points, max, and average.

Bar
Vertical bars, one per X-axis value. Bars are individually colored by the X column's select option colors when available.
Line
Connected point series. Best for time-series or ordered categorical data.
Area
Line chart with filled area below the curve at 10% opacity. Good for showing volume over time.
Pie
Donut chart. X axis categories become slices. Group by is disabled for pie charts.

Focus view

A task-focused mode with a built-in Pomodoro timer. The view surfaces your highest-priority incomplete tasks, lets you start/mark done/skip them one at a time, and tracks overall completion progress.

Timer ring
25-minute work timer with a 5-minute break. Click Play/Pause to control it. Timer state persists in localStorage across page reloads and tab switches.
Start button
Marks the active task's status column as "In progress" and starts the timer automatically if it isn't running.
Mark done
Sets the status column to "Done" and advances to the next task.
Skip
Removes the task from the current Focus session without changing its status. Skipped tasks can be restored by clicking the skip count label.
Easy wins
Toggles the sort order — when on, low-priority tasks bubble to the top so you can clear quick wins first.
Focus view auto-detects your status and priority columns by looking for columns named "Status" or "Priority" (case-insensitive). If your columns use different names, assign the status and priority semantic roles in the column settings.

Filters and sorts

Filters and sorts are per-view — each view has its own independent configuration. They are toggled from the toolbar using the Filter and Sort buttons. An active count badge appears on each button when rules are set.

Filters

OperatorWorks onDescription
containstext, select, multiselectValue includes the filter string.
isall typesExact match. For select, matches the option label.
is notall typesExcludes exact matches.
is emptyall typesCell has no value.
is not emptyall typesCell has any value.
gt / ltnumber, dateGreater than / less than for numeric comparison.
Filters and sorts can be paused — a toggle in the toolbar temporarily disables all rules without deleting them. Useful when you need to see all rows while editing, then re-enable filtering when done.

Sorts

Add one or more sort rules from the Sort panel. Each rule specifies a column and direction (ascending or descending). Multiple sorts are applied in order — the first rule is the primary sort, subsequent rules break ties.

Row color rules

Conditional formatting for table rows. Each rule specifies a column, an operator, a value to match, and a background color. The first matching rule wins — rules are evaluated in order. Matched rows can also have a custom text color, a left border accent, and a strikethrough style applied simultaneously.

Row color rules — overdue tasks highlighted red
TaskStatusDue date
Write database docsIn progressJun 26
Deploy v3To doJun 10 ⚠
Background
Row background color applied across all cells.
Text color
Optional override for all text in the row.
Border color
A 3px left-side accent border on the row.
Strikethrough
Applies line-through and 60% opacity to the whole row. Commonly used for "Done" or "Cancelled" states.

Field rules

Conditional column visibility. A field rule hides a specific column when a condition is met across the majority of rows. For example, hide the "Review notes" column when the "Status" column is not "In review" for most rows.

Field rules use a majority threshold — if more than 50% of rows match the condition, the column is hidden. This prevents a column from flashing in and out when only a few rows match.

Row peek

Every row has a dedicated page — a full document with a block editor and a property panel. The peek is a slide-in modal that shows this page without leaving the database view.

Peek icon (table)
Hover the first column of any row — click the panel icon to open the peek.
Click card (board / gallery)
Clicking anywhere on a board card or gallery card opens the peek.
Click row pill (calendar)
Clicking a row pill in calendar view opens the peek.
Open full page
A button in the peek header navigates to the row's standalone document page.
Esc
Closes the peek without navigating away.

The peek has two sections: a property panel at the top showing all non-computed column values with inline editors, and a full block editor below for freeform notes, attachments, and embedded blocks. The property panel saves on a 400ms debounce per field.

The peek inherits the parent document's background color. If your document uses a dark background, the peek will match — no jarring color flash when opening.

Automations

Automations run server-side logic when database events occur. Each automation has one or more triggers, a trigger operator (AND / OR), and one or more actions that fire when the conditions are met.

Triggers

status_changed_to
Fires when a specific select column changes to a specific option. Configure which column and which option in the trigger settings. Multiple status_changed_to triggers on one automation with OR operator lets you react to any of several status transitions.
page_added
Fires when a new row is added to the database. Useful for setting default values or sending a notification when any row is created.

Actions

set_column
Sets a column value on the row that triggered the automation. For text and URL columns, the value is a template string supporting {Column Name} tokens that resolve to the row\'s live cell values. For select, email, checkbox, number, and date columns, a static value is stored directly.
notify
Shows a toast notification with a message. The message supports {Column Name} tokens resolved against the triggering row.
Automations are stored per-view in view.config.automations and collected across all views at runtime. An automation can be enabled or disabled individually without deleting it.

Template tokens

Template strings in set_column and notify actions support tokens in the format {Column Name}. The token is replaced with the triggering row's value for that column at the moment the automation fires. Token resolution handles select (returns label), multiselect (comma-joined labels), checkbox (Yes/No), and date (formatted as "Jun 26, 2026").

Export and import

Export

The database toolbar includes Download and Upload buttons. Export downloads the current view's visible rows (after filters and sorts) in two formats:

CSV
Comma-separated values. Select and multiselect columns export as their option labels. Checkboxes export as "true" / "false". Values are double-quoted and internal quotes are escaped.
JSON
Structured JSON with a database name field and a rows array. Each row is an object keyed by column name with resolved values (labels, not IDs).

Import

Paste CSV text into the import modal. The importer matches CSV column headers to existing database columns by name (case-insensitive). Columns that match are populated; unmatched CSV columns are ignored. Each parsed row is added as a new database row — existing rows are not modified.

Import only populates text and number columns from CSV. Select, date, and other typed columns require the raw stored value format — importing labeled select values won't work unless they match the option IDs exactly.

The search field in the database toolbar filters the visible rows client-side across all text, number, email, and URL column values. The search is a simple case-insensitive substring match applied on top of any active view filters. Clearing the search restores all filter-passing rows.

Publishing

On published pages, the database renders in read-only Table view. Column types, select option colors, and row data are all visible. Relation, rollup, and formula columns are rendered as their resolved values. The row peek, property panel, and block editor are available on published pages — visitors can open a row peek but cannot edit cell values.

Automations, filters, sorts, and row color rules do not affect the published page render — they are editor-only features. The published table shows all rows in their natural order without any view-level processing.