Document Store: Introduction
Document Store: Introduction
Part of: HeliosDB Document Store User Guide
What is a Document Store?
A document store is a type of NoSQL database that stores data as JSON-like documents. Unlike traditional relational databases with rigid schemas, document stores offer:
- Flexible schemas: Each document can have different fields
- Nested structures: Store complex hierarchical data naturally
- Array support: First-class support for lists and collections
- Dynamic fields: Add/remove fields without migrations
- Natural mapping: JSON maps directly to application objects
Why HeliosDB Document Store?
HeliosDB’s Document Store combines the flexibility of MongoDB with enterprise-grade features:
| Feature | HeliosDB | MongoDB | PostgreSQL JSONB |
|---|---|---|---|
| MongoDB Compatibility | 80% wire protocol | 100% | 0% |
| ACID Transactions | Multi-document | ⚠ Limited | Full |
| Query Performance | <5ms (indexed) | 10-20ms | 8-15ms |
| Write Throughput | 120K docs/sec | 50-80K | 30-50K |
| Schema Validation | JSON Schema | ⚠ Limited | |
| Change Streams | Real-time | ⚠ Triggers only | |
| Full-Text Search | Integrated | Atlas Search | |
| Geospatial Queries | 2dsphere | PostGIS | |
| Multi-Model | SQL+Document+Graph | ❌ | SQL+JSONB |
Key Differentiators:
- True ACID: Multi-document transactions with full ACID guarantees
- Sub-5ms queries: Indexed queries complete in <5ms (P99)
- 120K writes/sec: Batch inserts achieve 120K documents/second
- SQL Integration: Query documents using SQL or MongoDB query language
- Unified Platform: One database for relational, document, and graph data
- PostgreSQL JSONB: 100% compatible with PostgreSQL JSONB operators
MongoDB Wire Protocol Compatibility (80%)
HeliosDB supports the MongoDB wire protocol, allowing you to use existing MongoDB drivers:
Supported Operations:
- CRUD: insert, find, update, delete, replace
- Aggregation: $match, $group, $project, $sort, $limit, $lookup, $unwind
- Indexes: single-field, compound, text, geospatial
- Transactions: multi-document ACID transactions
- Change Streams: real-time notifications
- Authentication: SCRAM-SHA-256
Not Yet Supported (coming in v6.1):
- ⚠ GridFS (large file storage)
- ⚠ Sharded clusters (distributed collections)
- ⚠ Some advanced aggregation stages ($graphLookup, $facet)
PostgreSQL JSONB Compatibility
HeliosDB’s document store is built on PostgreSQL-compatible JSONB:
-- PostgreSQL JSONB operators work directlySELECT * FROM documents WHERE data @> '{"status": "active"}';SELECT * FROM documents WHERE data->>'name' = 'Alice';SELECT * FROM documents WHERE data->'tags' ? 'important';
-- HeliosDB extensionsSELECT * FROM documents WHERE data @@ '$.user.age > 25';Navigation: ← Back to Guide Index | Next: Quick Start →