Cairn

Find your way around any database.

Cairn is a free desktop app for SQLite, MySQL, PostgreSQL, SQL Server, Oracle, MongoDB, Redis and Cassandra. Follow a value to the row it points at, see how your tables connect, and change data without being afraid of it.

Download for macOS Free. Your data never leaves your computer.

macOS (Intel)WindowsLinuxAll downloads

These builds aren't signed yet, so your computer shows a security pop-up the first time you open the app. Here's what to click, or run it with Python instead and skip the pop-up.

The orders table in Cairn: paid and pending shown as coloured labels, links to related rows, and a bar at the bottom saying two unsaved changes with Save, Undo and Discard.

Try the two things Cairn is built around

This is a toy copy of an online shop. Click an arrow beside a customer to jump to that customer. Click a total and change it: nothing is saved until you say so.

orders
idcustomer_idtotalstatus
customers
idnamecountry

Nothing selected yet.

Follow a value to the row it points at

A value that points at another table shows an arrow. Click it and you're on that exact row. Click the other arrow to see every row that points back.

Plenty of databases never declared their foreign keys. Find missing relationships reads the column names and suggests the links, and you accept the ones that are right.

The orders table with arrows beside each customer_id that open the customer they point at.

See how the tables connect

The schema map draws every table that takes part in a relationship, parents on the left and children on the right. Drag to pan, scroll to zoom, click a table to open it.

Hover a table and everything it touches lights up.

The schema map: customers, orders, reviews and items joined by arrows.

Edit in the grid, then save it all at once

Change cells, add rows, delete rows, and the changes wait in a bar until you press Save. They are saved together or not at all, and a row someone else changed in the meantime is never overwritten.

Mark a connection Production and it opens read-only, with a different colour over the whole window, and asks before it saves anything.

Two edited cells highlighted, and a bar reading 2 unsaved changes with Save changes, Undo and Discard.

Jump to anything

Press ⌘K or Ctrl K and type: a table, an open tab, another connection, or an action such as a new query or the schema map.

Also in the box: SSH tunnels, a SQL editor with autocomplete, CSV import that can check every row first, and export to CSV, JSON or SQL.

The jump menu listing tables, open tabs and actions.

Eight databases, one window

SQL

SQLite, MySQL, PostgreSQL, SQL Server, Oracle

NoSQL

MongoDB, Redis, Cassandra

It runs on your computer and stays there

  • Nothing is uploadedThe window talks to a small server on your own machine that only answers to itself.
  • Passwords are encryptedThe key lives in your system keychain: macOS Keychain or Windows Credential Manager.
  • The SQL assistant is off until you turn it onWhen it's on, it sends table and column names so it can write a query for you. It never sends your data.

Why "Cairn"?

A cairn is a pile of stones that marks the way across ground nobody has mapped. That's the job here: arrows to follow, a map to see where you are, and a way back when you've gone too far.

Download

macOS, Apple SiliconM1 and newer
Download
macOS, IntelMacs from before late 2020
Download
WindowsWindows 10 and 11
Download
Linux64-bit Intel or AMD computers
Download

Expect a pop-up the first time you open it

macOS says it can't verify the app is free of malware (newer versions offer only Done and Move to Trash), and Windows shows a blue "Windows protected your PC" box. That's because the builds aren't signed with a developer certificate yet. It doesn't mean anything is wrong with the file. You confirm once, and after that the app opens like any other.

On a Mac

  1. Open the downloaded disk image and drag Cairn onto Applications in the window.
  2. Open Cairn from your Applications folder.
  3. On macOS 15 (Sequoia) and newer a box appears with only Done and Move to Trash. Click Done. Don't move it to the Trash.
  4. Open System Settings, then Privacy & Security, and scroll down to Security.
  5. Next to "Cairn was blocked", click Open Anyway, enter your password, and click Open.

On macOS 14 and older it's quicker: right-click Cairn in Applications, choose Open, then click Open in the box.

On Windows

  1. Right-click the zip and choose Extract All.
  2. Open the folder and run Cairn.
  3. If Windows shows a blue box, click More info, then Run anyway.

Prefer one command? Or if a Mac says the app is damaged: that's the download quarantine, not the app. In Terminal, type the line below (with a space at the end), then drag Cairn from Finder into the Terminal window so it fills in the path, press Return, and open the app again. The steps above aren't needed after this.

xattr -dr com.apple.quarantine 

If the app is already in Applications, the whole thing is xattr -dr com.apple.quarantine "/Applications/Cairn.app".

Each release lists SHA-256 checksums on its release page.

On Linux there's no pop-up, and nothing to install first

The Linux build carries its own web view, so it doesn't need anything from your system's package manager. It needs a normal graphical desktop (any desktop has the usual graphics libraries, Mesa) and a 64-bit Intel or AMD computer. On an ARM computer, use the Python option below. Extract it and run it:

tar xzf Cairn-Linux-x86_64.tar.gz
./Cairn/Cairn

Or extract it with your file manager and double-click Cairn inside the folder. If no window opens, start it from a terminal as above and read what it prints.

Or skip the pop-ups: run it with Python

Started from your own Python, the app has no signing prompt at all. It needs Python 3.9 or newer, and the first run spends a minute installing what it uses. This is also the way on ARM Linux, which has no build yet.

macOS and Linux

git clone https://github.com/s-Himansh/db-visualizer.git
cd db-visualizer
./run.sh

Windows

git clone https://github.com/s-Himansh/db-visualizer.git
cd db-visualizer
python -m venv .venv
.venv\Scripts\python -m pip install -r requirements.txt
.venv\Scripts\python db.py