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

Database Entry

TrailDB


TrailDB is an easy portable C library that allows you to query a series of events. Unlike many other relational DBMS, the databases created by TrailDB are immutable files. Thus, TrailDB could achieve a deeper compression, greater scalability and allow an arbitrary number of consumers to access the databases in parallel.[04]

Source Code
https://github.com/traildb/traildb[02]
Developer
Country of Origin
US
Start Year
2014 [06]
Project Types
Commercial, Open Source
Written in
C
Supported Languages
C, D, Go, Haskell, Python, R
License
MIT License

But as each TrailDB is an immutable file, it could not be modified it once creation process is finalized so that it could not be used to replace DMBS that are currently running on production environment for transactions. One proper way is to use it as a complementary to the existing relational databases and key-value stores. For example, data could be gathered in regular intervals from all producers to encode a new TrailDBs and these immutable TrailDBs could be pushed to an object-based storage system, such as AWS S3, PureStorage FlashBlade, and so on. Then customers could use TrailDB library to access these immutable files in high performance and in parallel. As the description shows, it's a pretty good tool for OLAP of non-realtime records.

Another thing brought by the immutability is that it might be quite convenient for developers to use it as in high-level it only supports CREATE and READ operations. Thus, there are only a few APIs and no need to worry about any anomalous states which exist on other relational databases or key-value stores.

Database Entry

TrailDB


TrailDB is an easy portable C library that allows you to query a series of events. Unlike many other relational DBMS, the databases created by TrailDB are immutable files. Thus, TrailDB could achieve a deeper compression, greater scalability and allow an arbitrary number of consumers to access the databases in parallel.

But as each TrailDB is an immutable file, it could not be modified it once creation process is finalized so that it could not be used to replace DMBS that are currently running on production environment for transactions. One proper way is to use it as a complementary to the existing relational databases and key-value stores. For example, data could be gathered in regular intervals from all producers to encode a new TrailDBs and these immutable TrailDBs could be pushed to an object-based storage system, such as AWS S3, PureStorage FlashBlade, and so on. Then customers could use TrailDB library to access these immutable files in high performance and in parallel. As the description shows, it's a pretty good tool for OLAP of non-realtime records.

Another thing brought by the immutability is that it might be quite convenient for developers to use it as in high-level it only supports CREATE and READ operations. Thus, there are only a few APIs and no need to worry about any anomalous states which exist on other relational databases or key-value stores.[04]

Checkpoints


Not supported

Compression[05]


First, within a trail, events are always sorted by time. Thus, it utilizes Delta Encoding to compress the 64-bit timestamps.

Second, since events are grouped by UUID, which usually represents a logical entity such as an online shopping customer, these events within a trail tend to be predictable and TrailDB only encodes every change in behavior. This is not exactly the same as the Run-Length Encoding but similar.

Third, Huffman Coding, which is a kind of Prefix Compression method, is used to encode the skewed, low-entropy distributions of values.

Concurrency Control


Logging


Query Interface


Stored Procedures


System Architecture


Citations

6 sources
  1. TrailDB traildb.io
  2. GitHub - traildb/traildb: TrailDB is an efficient tool for storing and querying series of events · GitHub github.com
  3. TrailDB Docs traildb.io
  4. Introduction to TrailDB slides.com
  5. http://traildb.io/docs/technical_overview/ traildb.io Dead — Check Archive
  6. implement basic support for reading lines and fields github.com
Revision #6