DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

YugabyteDB


YugaByte DB is a transactional database management system that can scale up and down across multiple regions for planet-scale and geo-distributed applications. YugaByte DB is consistent and partition tolerant. It supports distributed ACID transactions, auto-sharding, and auto-balancing. Besides PostgreSQL-compatible SQL API, it provides another two APIs extended from Redis commands and Apache Cassandra Query Language (CQL), respectively. [05][06][07][08]

Source Code
https://github.com/yugabyte/yugabyte-db[02]
Developer
Country of Origin
US
Start Year
2016 [24]
Project Types
Commercial, Open Source
Written in
C++
Supported Languages
C, C#, C++, Go, Java, JavaScript, Python
Derived From
PostgreSQL, RocksDB
Inspired By
Cloud Spanner
Compatible With
Cassandra, PostgreSQL, Redis
Operating Systems
Linux, macOS
License
Apache v2
Twitter
@Yugabyte[04]

YugaByte DB uses a customized version of RocksDB, called DocDB, as its underlying storage engine. DocDB is a log-structured merge-tree (LSM) based "key to object/document" store.

Database Entry

YugabyteDB


YugaByte DB is a transactional database management system that can scale up and down across multiple regions for planet-scale and geo-distributed applications. YugaByte DB is consistent and partition tolerant. It supports distributed ACID transactions, auto-sharding, and auto-balancing. Besides PostgreSQL-compatible SQL API, it provides another two APIs extended from Redis commands and Apache Cassandra Query Language (CQL), respectively.

YugaByte DB uses a customized version of RocksDB, called DocDB, as its underlying storage engine. DocDB is a log-structured merge-tree (LSM) based "key to object/document" store.[05][06][07][08]

History[09]


YugaByte DB's first public beta release came out in November 2017. It was initially developed by the former team that built and ran Facebook's NoSQL platform that supported a number of Facebook's real-time applications. They left Facebook and found their own company, YugaByte Inc., aiming to build a database management system to unify the data layer for these mission-critical applications.

Checkpoints[07]


Compression[10][11]


Relying on RocksDB, YugaByte DB's storage engine is responsible for converting every supported data formats (i.e., documents, CQL rows, and Redis data) to key-value pairs and store them in RocksDB. How data compression is accomplished in YugaByte DB depends on how it is done in RocksDB, which uses Dictionary Compression.

Concurrency Control[12]


YugaByte DB uses MVCC and a variant of OCC for concurrency control. Under a distributed environment, it uses Two-Phase Commit with Early Acknowledgement. When a transaction wants to modify a number of rows, it first writes "provisional" records of each modified row into the target tablet storing the row. These records cannot be seen by the client unless the transaction commits. If conflicts occur when writing these records, the transaction will restart and abort. Otherwise, the transaction commits and notifies success to client. After that, the "provisional" records are applied and cleaned asynchronously.

Data Model[07]


YugaByte DB's storage engine, DocDB, is based on RocksDB. Unlike RocksDB, DocDB is a "key to object/document" store instead of a "key to value" store. Values in DocDB can be primitive types as well as object types (e.g., lists, sorted sets, and sorted maps) with arbitrary nesting.

Foreign Keys[13][14]


YugaByte DB does not support foreign keys as none of its CREATE TABLE syntax offers keywords to set foreign key constraints.

Isolation Levels[15]


Currently, YugaByte DB only supports Snapshot Isolation and is still working on supporting Serializable Isolation.

Joins[16][17][18]


Only YugaByte DB's PostgreSQL-compatible API YSQL supports join operations (i.e., inner, outer, left, and right join). The other two APIs, YEDIS and YCQL, do not support this operation. Currently YSQL is still in beta and is based on part of the open source PostgreSQL 10.4 codebase, so the join algorithms it supports are the same as Postgres, namely Nested Loop Join, Hash Join, and Sort-Merge Join.

Logging[07]


YugaByte DB uses the Raft distributed consensus algorithm for replication, so all the changes to the database will be recorded in Raft logs, which can be used during recovery.

Query Interface[19]


YugaByte DB offers the following three query APIs:

  • YCQL: Cassandra-compatible API with extended features including distributed ACID transactions, strongly consistent secondary indexes, and a native JSON data type.
  • YEDIS: Redis-compatible API that supports Redis commands and data types, with a new native Time Series data type provided.
  • YSQL: PostgreSQL-compatible API.

Storage Architecture[20]


YugaByte DB is a disk-oriented database management system. However, as its storage engine is implemented as a log-structured merge-tree (LSM), some of the data will be stored in memory before flushed out to disk.

Storage Model[07][21]


YugaByte DB's storage model depends on RocksDB, which uses Static Sorted Table (SST) format.

Storage Organization[07]


YugaByte DB's storage engine relies on RocksDB, which is implemented as a log-structured merge-tree (LSM).

System Architecture[22]


YugaByte DB uses shared-nothing system architecture. A table will be split into multiple tablets. Depending on the replication factor, each tablet has its corresponding number of replicas (tablet peers) across different nodes.

Views[23]


YugaByte DB supports non-materialized views in its YSQL API.

Citations

24 sources
  1. YugabyteDB: AI-Ready, Distributed, Postgres-Compatible Database yugabyte.com
  2. GitHub - yugabyte/yugabyte-db: YugabyteDB - the cloud native distributed SQL database for mission-critical applications. · GitHub github.com
  3. YugabyteDB | YugabyteDB Docs yugabyte.com
  4. https://twitter.com/Yugabyte twitter.com
  5. https://docs.yugabyte.com/latest/introduction/core-features/ yugabyte.com Dead — Check Archive
  6. YugabyteDB FAQS | YugabyteDB Docs yugabyte.com Dead — Check Archive
  7. https://docs.yugabyte.com/latest/architecture/concepts/persistence/ yugabyte.com Dead — Check Archive
  8. Learn application development | YugabyteDB Docs yugabyte.com
  9. YugabyteDB Has Arrived yugabyte.com
  10. https://docs.yugabyte.com/latest/architecture/concepts/persistence/#encoding-details yugabyte.com Dead — Check Archive
  11. Compression · facebook/rocksdb Wiki · GitHub github.com
  12. Transactional I/O path | YugabyteDB Docs yugabyte.com
  13. https://docs.yugabyte.com/latest/api/cassandra/ddl_create_table/ yugabyte.com Dead — Check Archive
  14. https://docs.yugabyte.com/latest/api/postgresql/ddl_create_table/ yugabyte.com Dead — Check Archive
  15. Transaction isolation levels | YugabyteDB Docs yugabyte.com
  16. PostgreSQL: Documentation: 10: 50.5. Planner/Optimizer postgresql.org
  17. Explore YSQL, the Yugabyte SQL API | YugabyteDB Docs yugabyte.com
  18. YSQL Architecture: Implementing Distributed SQL in YugabyteDB | Yugabyte yugabyte.com
  19. YugabyteDB API reference (for YSQL and YCQL) | YugabyteDB Docs yugabyte.com
  20. Key concepts | YugabyteDB Docs yugabyte.com
  21. A Tutorial of RocksDB SST formats · facebook/rocksdb Wiki · GitHub github.com
  22. Key concepts | YugabyteDB Docs yugabyte.com
  23. Explore YSQL, the Yugabyte SQL API | YugabyteDB Docs yugabyte.com
  24. https://www.crunchbase.com/organization/yugabyte crunchbase.com
Revision #22