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

Database Entry

TiDB


TiDB is an open source distributed scalable Hybrid Transactional and Analytical Processing (HTAP) database built by PingCAP. The goal of TiDB is to serve as a one-stop solution for both OLTP (Online Transactional Processing) and OLAP (Online Analytical Processing).[01]

Source Code
https://github.com/pingcap/tidb[02]
Developer
Country of Origin
CN
Start Year
2016
Project Type
Open Source
Written in
Go
Supported Languages
C, C++, Cocoa, D, Eiffel, Erlang, Go, Haskell, Java, Lua, Ocaml, Perl, PHP, Python, Ruby, Scheme, SQL, Tcl
Derived From
Cloud Spanner, Google F1
Operating System
Linux
License
Apache v2

Database Entry

TiDB


TiDB is an open source distributed scalable Hybrid Transactional and Analytical Processing (HTAP) database built by PingCAP. The goal of TiDB is to serve as a one-stop solution for both OLTP (Online Transactional Processing) and OLAP (Online Analytical Processing).[01]

History[04]


TiDB is inspired by the design of Google F1 and Google Spanner, and it supports features like infinite horizontal scalability, strong consistency, and high availability.

Concurrency Control[05]


Data Model[06]


TiDB uses TiKV as the underlying data storage engine, which uses the Key-Value model and can be seen as a huge distributed ordered Map that is of high performance and reliability.

Isolation Levels[07]


TiDB uses the Percolator transaction model. A global read timestamp is obtained when the transaction is started, and a global commit timestamp is obtained when the transaction is committed. The execution order of transactions is confirmed based on the timestamps. Repeatable Read is the default transaction isolation level in TiDB.

Joins[08]


TiDB’s SQL layer currently supports 3 types of distributed join: hash join, sort merge join (when the optimizer thinks even the smallest table is too large to fit in memory and the predicates contain indexed columns, the optimizer would choose sort merge join) and index lookup join.

Query Interface


SQL

Storage Architecture


Stored Procedures[09]


Views[09]


Derivative Systems
PR PranaDB
Revision #3