Skip to content

Database files

What a .basestudio database file is, when to use one, and how editing in several apps at once, sync and the trash work.

A database file (.basestudio) holds one or more Bases, their records, their views, their history and their files in one file. The desktop app and the Obsidian plugin make, open and edit them.

  • Choose vault notes when you want each record to be a note that Obsidian can open, link, search and edit.
  • Choose a database for records that do not need to be notes, such as data that you import from a spreadsheet or another app. A database is one file to move, back up or send, and it does not add thousands of notes to your vault.

Both kinds of Base have the same formulas and editing. A table of a database can also be a to-do list, with Tasks views. You can convert vault notes into a database and back. See Import and export.

  • New Base…: choose To-do list, or Database with One database file. See Make your first Base.
  • New database in the desktop sidebar, or New Database… in the desktop File menu. In the plugin, use Search commands → New Database…. A new database starts with a table of Name, Status, Tags and Due, with no records.
  • Import CSV, or an import from Notion, Airtable or Coda. The Obsidian plugin uses source files and destinations in the current vault, on desktop and mobile.

Each Base in a database is a table. Each table shows the records of its own folder in the database. In the desktop sidebar, select New table, or open the menu of a table for Rename table…, Duplicate table… and Delete table…. The menu of the database’s row has the file’s actions (New table…, Export to Obsidian…, Save a copy…, Trash…, Close). When the database has one table, that menu is the table’s Base menu too, with Base settings…, Turn into a to-do list and the table actions. A duplicate has the same columns, views and settings, with or without the records. New Table in Database… is also in the File menu. When you rename a table, its folder, its records, the links to them and the link columns follow.

In the plugin, Search commands → New Table in Database… adds a table and the table picker opens one. Table rename, duplicate and delete controls currently need the desktop app. See Host availability.

A link in a record opens a record or a file of the database first. When the database file is inside an Obsidian vault and the database has nothing with that name, the link opens a note or file of that vault, found as Obsidian finds it: [[Note name]], [[folder/Report.pdf]], or a path from the record’s folder such as [[../../RESEARCH/Plan]]. In the desktop app a note opens in Obsidian, a Base or database in BaseStudio, and any other file in its default app. In the Obsidian plugin it opens in a tab. Formulas and backlinks still read only the records of the database.

When the database file is inside an Obsidian vault, Open in Obsidian (in the record’s panel and in the row menu) opens a record in Obsidian as a temporary note. BaseStudio writes the record to a folder beside the database, for example Projects.editing/ for Projects.basestudio, and opens that note in Obsidian.

  • Edits in Obsidian save into the record about once a second. Each save is a step that Undo reverses and a version in the record’s history.
  • Changes in BaseStudio, such as a property in the table, go to the note in Obsidian. When both sides change the same line, the text from Obsidian is kept, and the earlier text stays in the record’s versions.
  • BaseStudio shows the note as read-only while the copy is open. Press Done in the record to save and remove the copy. Closing the database also removes it. In the Obsidian plugin, closing the note’s tab does the same.
  • If BaseStudio closes before the copy is removed, the next time the database opens it saves the copy into the record and shows Done again.
  • Links to other records and images stored in the database do not work in the copy, because they are not files of the vault.
  • Obsidian Sync copies the folder to your other devices while it exists. To prevent this, add the .editing folders to the excluded folders in Obsidian’s Sync settings.

A record that you delete goes to the database’s trash. Select Trash… in the Base or table menu, then Restore a record or Delete for good.

Each record and each Base keeps earlier versions: every version from the last day, the newest of each day for 30 days and the newest of each week before that, at most 50. See Records.

A database keeps every file that its records use inside the database file: images, PDFs and other attachments. This is true for a file that you add to a record, a file that an import or a conversion brings in, and a file in a template. Attachments are not kept in a companion folder. For a current copy that includes saved changes, use Save a copy… in the desktop app. If you copy files directly while an app has the database open, include its .bschanges files too; they can hold changes not yet folded into the database. See Edit anywhere at once.

Each file can be at most 100 MB. Vault sync uploads the whole database file each time BaseStudio writes it (see Edit anywhere at once), so a database with many large files makes larger uploads.

Each database has image settings. Open the table’s … menu and select Optimize images…. The settings apply to each image that you add to a record, and to an import (Import to database… shows them too). A change is saved at once.

  • Compression
    • Compressed (the default): each JPEG, PNG and WebP image is saved as lossy WebP, and an image larger than 2560 px is scaled down. WebP keeps transparency. Photos lose their camera data and location. Obsidian and browsers show WebP; some older apps do not.
    • Original: images are stored exactly as they are.
  • Copy web images: a web image that a record shows is copied into the database, so it still shows offline: an image in the text (![](https://…)), a web address in an Image column, and a web address in any property that ends in an image extension (.jpg, .png, .webp, .gif, .avif, .svg). The property then links to the stored copy. A link to a web page (a shop’s product page) stays a link. A download that fails leaves the link as it was.

In Obsidian, shown and stored web images use the same public-address checks. Obsidian’s network API supplies a complete response buffer: size rejection happens after that download, and a cancelled native request may continue. Downloads have bounded admission; cancelled queued requests do not start. Obsidian does not expose DNS lookup or redirect destinations, so the plugin can check only the original address text. The desktop app checks resolved addresses and redirects.

BaseStudio keeps an image as it is when the result would not be smaller, and it does not change GIF, SVG, HEIC or animated images. A photo keeps its orientation and its colours: the WebP keeps the photo’s colour profile. The desktop app and Obsidian compress an image in the same way.

Optimize images… in the same dialog compresses the images that the database already holds and copies in the web images its records show. Before you start it, the dialog says how many images it would check and their size, with an estimate of their size after (from compressing a few of them). The run opens its own window. Editing goes on while it works, and Stop ends it after the images it is on. Nothing is changed until you select Apply: first the window lists every image with its size before and after. The links in the records follow a file whose type changes. A run also gives an image without a file extension (an export can drop .jpg) the extension of its type, so it shows.

A run keeps the original files inside the database, so Undo (in the dialog, or the table’s undo) restores them. The originals take space: the Optimize images… menu item shows how much while they are kept. Delete originals… deletes them and makes the database file smaller; after that, the runs can no longer be undone. A later run skips the images that a run already did.

A vault Base’s Optimize images… dialog has the same Compression choice. Optimize images… there compresses the image files that the Base’s records link to, and changes every link to them in the vault, also in notes outside the Base. The originals go to the vault’s trash (.trash, where Obsidian shows them), so Undo brings them back. A vault Base keeps web images as links, so it has no Copy web images choice, and images that you add later are not compressed.

Under File names, the dialog checks the Base’s records for linked images without a file extension. Obsidian and BaseStudio cannot show such an image. Fix names… lists them; Rename gives each the extension of its type and changes every link to it, as one undo step.

A database does not need one app to close before another can edit it. You can open it in the desktop app and in Obsidian on the same computer, on other devices that sync the vault, and in agents that use the command line, all at the same time. Each app shows the changes of the others within a second or two, with no reload.

Each app keeps its new changes in a small change file beside the database until it writes them into the database file:

Tasks.basestudio the database
Tasks.3f9a1c2e.desktop-9c1e.k2p8.bschanges changes that are not in the database file yet
  • An app writes its changes into the database file 30 seconds after your last edit, sooner after many changes, and when you close the database.
  • When the database file holds every change of a change file, the change file is removed. Usually only the database file is left.
  • Obsidian’s file explorer does not show .bschanges files, and on a Mac the desktop app hides them in Finder. Other file managers show them while they exist. Do not delete them: they can hold changes that are not in the database file yet.
  • The names do not start with a dot, because Obsidian Sync does not copy files whose names start with a dot.

When two apps change the same record, BaseStudio keeps the changes of both, property by property, and the note text too. When both change the same property, the later change is kept. The other value goes into the record’s history.

You can keep a database in a vault that you sync, for example with Obsidian Sync. Obsidian Sync copies .basestudio and .bschanges files only when Sync all other types is on in Settings → Sync on every device. BaseStudio shows a notice when it is off.

Changes from another device arrive with its change file or with a new copy of the database file, and the open database shows them at once. When a sync service makes a conflict copy of a database (for example Tasks (conflicted copy).basestudio or Tasks.sync-conflict-….basestudio), BaseStudio merges it into the database and moves the copy to the trash.

A database is a SQLite file. Other programs can read it, for example SELECT path, source FROM notes;. To change it, use the BaseStudio app, the Obsidian plugin or the command line. A change that another program writes into the file with SQL is lost the next time BaseStudio writes the file.