hzc26 downloadsVisual database diagram editor (ER diagrams) powered by drawdb. Create, edit and export database schemas as .drawdb files.
A visual database diagram editor (ER diagrams) for Obsidian, powered by drawdb.
Create, edit, and export relational database schemas directly inside your vault using .drawdb files — fully compatible with the drawdb JSON format.

CREATE TABLE + ALTER TABLE FOREIGN KEY statements.drawdb files use the same JSON format as drawdb.io, so diagrams can be opened and edited in either toolA new diagram.drawdb file is created in your vault root and opened in the editor.
.drawdb fileClick any .drawdb file in the file explorer — it opens automatically in the DrawDB editor.
| Action | How |
|---|---|
| Add a table | Click + Table in the toolbar, or double-click an empty area on the canvas |
| Move a table | Drag the colored header |
| Select a table | Click the header; properties appear in the right panel |
| Edit a field | Click a field row in the right panel to expand its properties |
| Add a field | Click + Add Field in the right panel |
| Delete a table | Select it, then click Delete Table in the right panel, or press Delete |
| Draw a relationship | Switch to Draw Relation mode, click a source field, then click a target field |
| Delete a relationship | Click the line on the canvas to select it, then click Delete Relationship, or press Delete |
| Pan the canvas | Hold Space and drag, or use the middle mouse button |
| Zoom | Scroll the mouse wheel (zooms toward cursor) |
| Fit all tables | Click Fit in the toolbar |
| Save | Click Save or press Ctrl+S (Cmd+S on Mac) |
| Undo / Redo | Ctrl+Z / Ctrl+Shift+Z |
| Export SQL | Click Export SQL — downloads schema.sql |
npm install
npm run build
main.js, manifest.json, and styles.css to:<YourVault>/.obsidian/plugins/obsidian-drawdb/
Coming soon — once submitted to the Obsidian community plugin list.
.drawdb files are plain JSON and fully compatible with the drawdb.io web app. Example:
{
"database": "MySQL",
"tables": [
{
"id": 1,
"name": "users",
"x": 80,
"y": 60,
"color": "#175e7a",
"comment": "",
"fields": [
{
"id": 2,
"name": "id",
"type": "INT",
"primary": true,
"unique": true,
"notnull": true,
"autoincrement": true,
"default": "",
"size": "",
"comment": "",
"check": "",
"values": []
}
],
"indices": []
}
],
"references": [],
"notes": [],
"areas": []
}
Settings → DrawDB
| Setting | Description |
|---|---|
| Default database type | Database type assigned to newly created diagrams (MySQL, PostgreSQL, SQLite, MSSQL, MariaDB) |
# Install dependencies
npm install
# Watch mode (auto-recompile on save)
npm run dev
# Production build
npm run build
# Lint
npm run lint
Requirements: Node.js 18+, npm.