OrientDB is a multi-model NoSQL DBMS that supports of graph, documents, key-value, and object-oriented storage. Instead of just implementing another layer with an API, OrientDB integrates those models into the core engine. Moreover, OrientDB supports SQL syntax with few differences from standard SQL and extends SQL to support complex graph concepts. It is also an ACID compliant DBMS and able to handle transactional workloads. OrientDB supports a multi-master distributed architecture.[04][05]
- Website
- https://orientdb.dev[01]
- Tech Docs
- https://orientdb.dev[01]
- Developer
- Country of Origin
- GB
- Start Year
- 2010 [03]
- Acquired By
- Project Types
- Commercial, Open Source
- Written in
- Java
- Supported Languages
- C, C#, C++, Clojure, Elixir, Go, Groovy, Java, JavaScript, Perl, PHP, Python, Ruby, Scala
- Operating System
- All OS with Java VM
- License
- Apache v2
OrientDB is a multi-model NoSQL DBMS that supports of graph, documents, key-value, and object-oriented storage. Instead of just implementing another layer with an API, OrientDB integrates those models into the core engine. Moreover, OrientDB supports SQL syntax with few differences from standard SQL and extends SQL to support complex graph concepts. It is also an ACID compliant DBMS and able to handle transactional workloads. OrientDB supports a multi-master distributed architecture.[04][05]
History[03]
OrientDB was originally developed by Luca Garulli in 2010. Luca rewrote the fast persistent layer of OrientDB ODBMS in Java as OrientDB. Starting from 2012, OrientDB is sponsored by OrientDB LTD, whose founder and CEO is Luca. OrientDB LTD is a for-profit company, whose former is called Orient Technologies LTD. Andrey Lomakin redeveloped the storage engine of OrientDB, called plocal, from 2012 to 2014. In 2013, Andrey joined the company as the co-owner and the leader of R&D department of OrientDB LTD.
Checkpoints[06]
OrientDB supports full check point. It is a simple disk flush. It can be invoked when cluster is added to storage, cluster changes or the storage closes. Users can set time stamps to perform full check pointing in those scenarios during the configuration of storage engine. OrientDB plans to support fuzzy check pointing in the future and it is under implementation now.
Compression[07]
OrientDB supports record-level compression. The compression includes two types of algorithms: gzip and snappy. The default is no compression. Users can set compression choices using SQL syntax ALTER CLUSTER or in the configuration of storage engine. Users can also define custom compression algorithms by registering them in the class OCompressionFactory(). The records will be decompressed when they are loaded from the storage engine.
Concurrency Control[08][09]
OrientDB applies Multi-version Concurrency Control and checks the integrity on commit. It is optimistic and OrientDB does not support pessimistic transactions. When a transaction has a conflict with another, OrientDB will throw an OConcurrentModificationException and the application can determine whether to abort it or not. With Graph, OrientDB provides various consistency mode: tx, notx_sync_repair and notx_async_repair. tx mode, the default mode will maintain consistency using transactions while the other two does not use transactions. They replies on a database repair operation. notx_sync_repair mode will run the repair synchronously while notx_async_repair will run the repair asynchronously to the application.
Data Model[10]
OrientDB is a multi-model DBMS. It supports graph, document, key-value and object-oriented models. It combines all the features of the four models into the core engine rather than just implement an additional layer of APIs to support various models.
-
The graph model represents a network structures including vertices representing entities and edges showing connections among vertices. Besides mandatory properties to define vertices and edges, OrientDB allows user-defined properties for both vertices and edges, which make them like documents.
-
For document model, the main difference between OrientDB and common document DBMS, e.g. MongoDB, is that OrientDB introduces the concept "LINK" as the relationship among documents. Hence, when users refer a document, all "LINK"s will be automatically resolved by OrientDB instead of done by developers in common document DBMS.
-
The key-value model is simplest among all four models. OrientDB uses
ClassorClustersto organize key-value pairs similar toBucketsin common key-value models. The difference is that OrientDB supports richer types of values: it allows graph elements and documents as values. -
The object-oriented model is derived from the concept of object-oriented programming. OrientDB uses the concept
Classto define records, close toTablein relational model. It supports inheritance and polymorphism ofClass.
Foreign Keys[01]
OrientDB does not support foreign keys. However, it has the concept LINKS, which stores target RID in the source record. It builds up relationships similar to the functionality of foreign keys.
Indexes[11][12][13]
OrientDB supports five index algorithms, which belong to three categories. Moreover, OrientDB allows users to define custom index engines by asking them to implement OIndexFactory and OIndexEngine classes.
-
SB-Tree index The SB-tree index is a variant of B-tree index with optimizations focusing on data insertion and long range queries. It is the default index type of OrientDB.
-
Hash index OrientDB supports two hash index algorithms, regular hash index and auto sharding index, an implementation of distributed hash table based on Murmur3 hash function. Both index applies extendible hashing algorithm and do not support range queries.
-
Lucene engine Apache Lucene Core is an implementation of inverted index. OrientedDB provides full-text and spatial index using Lucene engine. OrientDB can handle indexes in the same way as handling basic type
Class. It uses SQL syntax to manage indexes using the formatindex:name, wherenameis the index name. OrientDB has two methods to update indexes, automatic and manual. The default is manual. When creating the index, users should specify the type of indexing and the relevant classes. If users would like to use automatic method for updating indexes, they also need to explicitly specify that when creating indexes.
Isolation Levels[08]
OrientDB supports two isolation levels: Read Committed and Repeatable Reads. The default isolation level is Read Committed. Read Committed is the only available isolation level with remote protocol. Repeatable Reads is only allowed with plocal and memory protocol and consumes more memory than Read Committed. Users can change the default isolation level using Java API.
Joins[14]
OrientDB does not support join syntax. It introduces the concept LINKS to represent relationships. It uses dot operation (.) to traverse LINKS in order to achieve the same goal as join.
Logging[15]
OrientDB applies Write Ahead Logging (WAL). It performs physical logging by recording changes done in pages. For each page change, OrientDB records offset and length of bytes changed with before and after values.
Storage Architecture[18][19]
OrientDB supports in-memory and disk-oriented databases. It has two kinds of abstraction of storages: Paginated Local Storage(plocal) and Memory Storage. Paths in storages are prefixed by plocal: and memory:. OrientDB also supports larger-than-memory databases. JVM will allocate more space from swap and the JVM option -XX:MaxDirectMemorySize can be set to limit total size of memory.
Storage Model[19]
OrientDB works with data using page model. It stores record data and meta data in pages.
Stored Procedures[20]
OrientDB introduces the concept Functions similar to Stored Procedure of RDBMS. Functions can be written in SQL and JavaScript but it can be executed via SQL, Java, REST and Studio.
System Architecture[21]
OrientDB supports multi-master shared-nothing distributed architecture. OrientDB uses the Hazelcast Open Source project for discovering nodes automatically, storing runtime configuration and synchronization.
Views[22]
OrientDB supports materialized views in the latest version. It uses the SQL syntax to create or drop views. OrientDB handles materialized views as the basic type Class. Materialized views can be configured to read-only or updatable. The default is read-only. Users can define update interval to update views every certain period. Also, users can manually modify views and the modification will be reflected in corresponding records. Updatable views cannot be created from aggregation.
Citations
22 sources- https://orientdb.dev orientdb.dev
- GitHub - orientechnologies/orientdb: OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, F github.com
- OrientDB - Wikipedia wikipedia.org
- https://orientdb.com/docs/3.1.x/misc/Overview.html orientdb.com
- https://orientdb.com/docs/3.1.x/gettingstarted/Tutorial-SQL.html orientdb.com
- https://orientdb.com/docs/3.1.x/internals/plocal-storage-engine.html orientdb.com
- https://orientdb.com/docs/3.1.x/sql/SQL-Alter-Cluster.html orientdb.com
- https://orientdb.com/docs/3.1.x/internals/Transactions.html orientdb.com
- https://orientdb.com/docs/3.1.x/java/Graph-Consistency.html orientdb.com
- https://orientdb.com/docs/3.1.x/datamodeling/Tutorial-Document-and-graph-model.html orientdb.com
- https://orientdb.com/docs/3.1.x/indexing/Indexes.html orientdb.com
- https://orientdb.com/docs/3.1.x/internals/Custom-Index-Engine.html orientdb.com
- https://orientdb.com/docs/3.1.x/indexing/Auto-Sharding-Index.html orientdb.com
- https://orientdb.com/docs/3.1.x/sql/SQL-Introduction.html#no-joins orientdb.com
- https://orientdb.com/docs/3.1.x/internals/Write-Ahead-Log.html orientdb.com
- https://orientdb.com/docs/3.1.x/apis-and-drivers orientdb.com
- GraphQL for OrientDB is finally available google.com
- https://orientdb.com/docs/3.1.x/internals/Memory-storage.html orientdb.com
- https://orientdb.com/docs/3.1.x/internals/Paginated-Local-Storage.html orientdb.com
- https://orientdb.com/docs/3.1.x/admin/Functions.html orientdb.com
- https://orientdb.com/docs/3.1.x/distributed/Distributed-Architecture.html orientdb.com
- https://orientdb.com/docs/3.1.x/datamodeling/Concepts.html orientdb.com