Work with JSON columns, nested documents, and flexible schemas across all databases.
Prax provides comprehensive JSON support for storing and querying semi-structured data, from PostgreSQL's JSONB to MongoDB's native BSON documents.
| Feature | PostgreSQL | MySQL | SQLite | MSSQL | MongoDB |
|---|---|---|---|---|---|
| JSON Type | ✅ JSONB | ✅ JSON | ✅ JSON | ✅ NVARCHAR | ✅ BSON |
| Path Queries | ✅ ->, ->> | ✅ ->, ->> | ✅ json_extract | ✅ JSON_VALUE | ✅ Dot notation |
| JSON Indexing | ✅ GIN | ✅ Generated | ❌ | ✅ | ✅ Native |
| Containment | ✅ @> | ✅ JSON_CONTAINS | ❌ | ❌ | ✅ $elemMatch |
Navigate JSON structures with a cross-database path API.
Use JSON-specific filters in your queries.
Update specific fields within JSON columns without replacing the entire document.
Build JSON objects and arrays from query results.
Create indexes for efficient JSON queries.
Use jsonb_path_ops for containment queries (@>).
Use default ops for key existence (?).
Extract JSON values into virtual columns and index those for efficient filtering.
MongoDB's native document model with atomic update operators.
Define embedded document types in your schema and query them type-safely.
JSONB is binary, supports indexing, and is faster for most operations. Use JSON only when you need to preserve key order or whitespace.
If you frequently query a specific JSON path, create an expression index on that path rather than a full GIN index.
JSON columns accept any valid JSON. Use CHECK constraints or application validation to ensure schema consistency.
In MongoDB, embed frequently-accessed data together. In SQL databases, use JSON for truly flexible data, not as a substitute for proper relations.