- Docs
- Views
Databases
Turn a folder of notes into a database with table, board, gallery and calendar views. Every value is plain frontmatter.
A database in Scaffold is not a special file. It is a note that describes how to look at a folder of other notes. Each note in that folder is a row, and each row’s values are ordinary frontmatter keys at the top of the note. Delete Scaffold tomorrow and every byte still makes sense in a text editor.
The database note
Any note becomes a database note when its frontmatter has a top-level database: key. The body of the note stays
ordinary Markdown, so use it to describe what the database is for.
---
database:
version: 1
source: { folder: "Projects", recursive: false }
properties:
status: { type: select, options: [{ value: Idea, color: gray }, { value: Doing, color: blue }, { value: Done, color: green }] }
tags: { type: multi-select, options: [{ value: client }, { value: internal }] }
due: { type: date }
budget: { type: number, format: currency }
shipped: { type: checkbox }
owner: { type: text }
client: { type: relation, target: "CRM/Clients.md" }
site: { type: url }
views:
- { name: All, kind: table, columns: [status, due, owner, client], sort: [{ property: due, direction: asc }] }
- { name: Board, kind: board, groupBy: status }
- { name: Gallery, kind: gallery, cover: cover }
- { name: Calendar, kind: calendar, date: due }
defaultView: All
---
Remove the database: key and it is a normal note again. Scaffold only ever rewrites that one key of the database note.
Which notes are rows
source.foldersets the folder whose notes are rows. Leavesourceout and the folder that contains the database note is used.recursive: trueincludes notes in subfolders as well; the default is only the folder itself.- The database note itself is never a row.
Rows are notes
A row is just a note in the source folder. Its values live in its own frontmatter:
---
status: Doing
due: 2026-11-18
owner: Ines
tags: [client]
client: ["[[Acme Studio]]"]
---
Quotes from three carpenters, compared line by line.
When you change a value in a table cell or drag a card to another column of a board, Scaffold rewrites only that key in that note, through the same atomic, conflict-aware save that every note uses. Comments and key order in the frontmatter are kept. Renaming or moving a row note works like renaming any note.
The file name of each row is its title, which is always the first column.
Property types
| Type | Stored as | Example |
|---|---|---|
text |
a string | owner: Ines |
number |
a number; format is plain, percent or currency (display only) |
budget: 1200 |
select |
one string from options |
status: Doing |
multi-select |
a YAML list of strings | tags: [client, internal] |
date |
YYYY-MM-DD or YYYY-MM-DDTHH:mm |
due: 2026-11-18 |
checkbox |
true or false |
shipped: false |
url |
a string | site: https://example.org |
relation |
a YAML list of wikilinks | client: ["[[Acme Studio]]"] |
- A
relationnames another database note intarget; its rows are offered as choices. Because the values are wikilinks, relations show up in backlinks and the graph automatically. If a related note is deleted, the link stays and is shown muted, like any unresolved link. - Option colours come from a fixed Scaffold palette:
gray,brown,amber,orange,red,pink,purple,blue,tealandgreen. They follow your theme, light or dark. - A property with an unknown type or a malformed definition is treated as
textand Scaffold shows a warning. It never refuses to open the database.
Views
Every view has a name and a kind. Switch between them with the view tabs at the top of the database.
| Kind | Shows | Needs |
|---|---|---|
table |
rows and columns, editable in place | nothing |
board |
one column per option, cards you can drag | groupBy: a select or checkbox property |
gallery |
cards, with an optional cover image | optional cover: a property holding an image path or URL |
calendar |
a month grid, weeks starting on Monday | date: a date property |
list |
a compact list of titles | nothing |
All views also accept:
columns: which properties are shown, in order.sort: a list such as[{ property: due, direction: asc }].filter: the same filter tree that Bases use, for example only rows whosestatusis notDone.limit: show at most this many rows.
On a board, columns follow the order of the options, plus a No value column for rows without one. Dragging a card between columns sets that property on the row.
Tips
- Start from the template gallery: the project tracker and CRM templates are complete databases.
- Embed a database in another note with
![[Projects/Projects.md]]; see rich blocks. - Because rows are notes, everything else works on them too: search, tags, links, daily notes, the graph.