Asopitech With · Note app
Obsidian with Alopex DB
Obsidian is a note app that links notes stored on the device. What if we rebuilt it with Alopex DB?
Updated: Oct 12, 2026
What the service does
Obsidian is a note app that stores notes on the device so they open quickly, even offline. Notes link to each other, and a graph shows the connections. The data is note text, links between notes, and tags.
Where the data lives
- SQL tables: notes, links and tags live in tables. The notes that point to a note come from the link table.
- Full-text search: a full-text index on the note text finds the exact words.
- Vectors: per-paragraph embeddings in a vector column find notes close in meaning, even with different words.
The app computes the embeddings and writes them in the same transaction as the note.
Deployment
Alopex DB is embedded in the desktop and device apps. Each vault is one .alopex file, and no server is needed. Moving a vault to another device is a file copy.
Why Alopex DB fits
Notes have to open fast and close at hand. Alopex DB combines the link table, full-text search and semantic search inside one file. Search and the view of connections share the same SQL.
See it in code
Notes and links live in tables, and backlinks (notes pointing at a note) are pulled with SQL. Just the core of following connections.
import alopex
# 保管庫ごとに1つの .alopex ファイル
db = alopex.Database.open("obsidian.alopex")
# ノートとリンクを持つ
db.execute_sql("""
CREATE TABLE IF NOT EXISTS notes (
id INTEGER PRIMARY KEY,
title TEXT,
body TEXT
)
""")
db.execute_sql("""
CREATE TABLE IF NOT EXISTS links (
src_id INTEGER,
dst_id INTEGER
)
""")
notes = [(1, "MOC", "入口のノート"), (2, "Rust", "所有権のメモ"), (3, "WASM", "RustからWASM")]
for n in notes:
db.execute_sql("INSERT INTO notes (id, title, body) VALUES (?, ?, ?)", list(n))
for src, dst in [(1, 2), (1, 3), (3, 2)]: # MOC→Rust, MOC→WASM, WASM→Rust
db.execute_sql("INSERT INTO links (src_id, dst_id) VALUES (?, ?)", [src, dst])
# 「Rust」を指しているノート(バックリンク)を引く
rows = db.execute_sql("""
SELECT s.title
FROM links AS l
JOIN notes AS s ON s.id = l.src_id
JOIN notes AS d ON d.id = l.dst_id
WHERE d.title = ?
ORDER BY s.title
""", ["Rust"])
for row in rows:
print("backlink:", row["title"])Reading the link table in reverse gives the backlinks; the graph view lines up from the same SQL.
Alopex DB handles the link table, full-text search and semantic search in one file. Build your own vault with it, starting at the quickstart.