Introduction
OrientDB is a multi-model database that stores documents, graphs, key-value pairs, and objects in a single engine without requiring separate systems. Its extended SQL dialect lets developers query documents and traverse graph relationships in the same statement, eliminating the need for JOINs.
What OrientDB Does
- Stores and queries data as documents, graphs, key-value pairs, or objects using a single API
- Provides an extended SQL syntax that adds graph traversal operators like OUT(), IN(), and TRAVERSE
- Supports ACID transactions across both document and graph operations
- Scales horizontally with built-in multi-master replication and automatic sharding
- Includes OrientDB Studio, a web-based management interface for schema design, queries, and monitoring
Architecture Overview
OrientDB uses a record-based storage engine where each record has a unique Record ID (RID). Graph edges are stored as direct physical links between records, making traversals an O(1) pointer follow rather than an index lookup. The database supports schema-full, schema-less, and schema-mixed modes. It runs on the JVM and embeds a distributed coordination layer based on the Hazelcast protocol for cluster management.
Self-Hosting & Configuration
- Deploy via Docker or download the binary distribution and run
server.sh/server.bat - Set the root password via the
ORIENTDB_ROOT_PASSWORDenvironment variable or during first startup - Configure storage, networking, and memory in
config/orientdb-server-config.xml - For clusters, set up distributed mode by editing
config/default-distributed-db-config.json - Enable automatic backups with the built-in backup scheduler or use
EXPORT DATABASEfor manual dumps
Key Features
- True multi-model engine avoids the overhead of synchronizing separate document and graph databases
- Direct record links make graph traversals faster than traditional relational JOINs
- Extended SQL with graph syntax lowers the learning curve compared to purely graph-specific query languages
- ACID-compliant transactions work across document and graph operations in the same commit
- Built-in HTTP and binary protocol APIs with official drivers for Java, Node.js, Python, and more
Comparison with Similar Tools
- Neo4j — purpose-built graph database with the Cypher query language; OrientDB adds document and key-value models in the same engine
- ArangoDB — another multi-model database supporting documents, graphs, and search; OrientDB uses an extended SQL dialect while ArangoDB uses AQL
- MongoDB — leading document database; OrientDB adds native graph capabilities that MongoDB does not offer out of the box
- Dgraph — distributed GraphQL-native database; OrientDB provides a broader set of data models beyond graphs
FAQ
Q: Is OrientDB still actively maintained? A: OrientDB is maintained by SAP, which acquired the original company. The Community Edition remains open source under the Apache 2.0 license.
Q: Can I use standard SQL with OrientDB? A: OrientDB supports an extended SQL dialect that covers most standard SQL operations plus graph-specific commands like TRAVERSE and MATCH.
Q: How does OrientDB handle relationships compared to a relational database? A: Instead of foreign keys and JOINs, OrientDB stores direct physical pointers (edges) between records, making relationship traversal significantly faster.
Q: What is the maximum dataset size OrientDB can handle? A: OrientDB can handle billions of records across a sharded cluster. Individual nodes can manage hundreds of gigabytes with proper JVM tuning.