Schema
Understanding RA-H's data structure
Why SQLite?
RA-H uses SQLite for true local-first data ownership. Your knowledge stays on your machine - no cloud dependencies, no data mining, no vendor lock-in.
Benefits:
- Single file database - Simple and portable
- No cloud dependencies - Your data never leaves your Mac
- Fast vector search - sqlite-vec extension for semantic connections
- Full-text search - Google-like text search across all your content
- Your data forever - Portable format that migrates with future Mac app
Database Location: ~/Library/Application Support/RA-H/db/rah.sqlite
Database Schema
Core Data Model
Nodes
Your knowledge items. Each node represents a discrete piece of information:
- Papers, ideas, people, projects, videos, tweets, etc.
- Title and content (supports Markdown)
- Type categorization
- External links to source material
- Metadata for structured information
- Embeddings for semantic search
Edges
Connections between nodes that form your knowledge graph:
- Directed relationships (from → to)
- Context describing the relationship
- Source tracking (user-created vs agent-discovered)
- User feedback ratings
Dimensions
Flexible categorization tags that emerge from your content:
- Multi-select (nodes can have many dimensions)
- No rigid hierarchies
- Priority dimensions for focused filtering
- Automatically suggested by AI based on content
Chunks
Long-form content split into searchable pieces:
- Enables detailed search within documents
- Each chunk indexed separately
- Maintains reference back to source node
- Powers the content embedding search
Two-Layer Search
RA-H uses two types of embeddings for different search needs:
Node-Level Embeddings
Search across all your knowledge items at a high level. Find nodes that are semantically similar to your query, even if they don't contain the exact words.
Chunk-Level Embeddings
Search within the content of long documents. Find specific passages that answer your question, even deep within large papers or notes.
Data Ownership
Everything lives in a single SQLite file on your Mac:
- No cloud sync required
- No subscription to access your own data
- Easy to backup (just copy one file)
- Portable to future versions of RA-H
- Compatible with standard SQLite tools
When the Mac app launches, it will automatically migrate your beta data - zero data loss during the transition.