Skip to content

kwestlund/cooldb

Repository files navigation

CoolDB: Embedded Database for Java

Latest release javadoc build

CoolDB is a pure java, zero dependency, embedded database system.

Some technical highlights:

  • ACID compliant transactions.

  • B+tree indexing (multi-column and non-unique support) with support for ACID transactions.

  • Intelligent paging using combination of clocked-LRU and hint-based replacement strategy. Enforces the WAL protocol by force-writing logs prior to page flushing.

  • Recovery manager/log writer implements the ARIES recovery method. Handles transaction rollback during normal processing and guarantees the atomicity and durability properties of transactions in the fact of process, transaction, and system failures.

  • Mixed method 2PL and MVCC concurrency control. Transactions may run at two levels of isolation: Serializable and Repeatable Read.

  • Thread safe: each transaction session can be run in its own thread.

CoolDB was designed to serve as the foundation for an RDBMS.

Adding CoolDB to your build

CoolDB's Maven group ID is com.cooldb, and its artifact ID is cooldb.

To add a dependency on CoolDB using Maven, use the following:

<dependency>
    <groupId>com.cooldb</groupId>
    <artifactId>cooldb</artifactId>
    <version>1.0.1</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  implementation("com.cooldb:cooldb:1.0.1")
}

Usage

See the latest CoolDB API javadocs for an overview and examples.

History

CoolDB was originally written in Objective-C on a NeXTSTEP slab back in 1992, then ported to C++, and finally to its current form in Java.

CoolDB was developed for research purposes

The technology contained in this library is based on countless hours spent in the stacks of MIT's Barker Engineering Library devouring years of ACM SIGMOD and VLDB publications concerning then state-of-the-art database technology.

Fun Fact

CoolDB, by twist of fate, ran (and may still be currently running) in the algorithmic trading systems of a large Wall Street brokerage accounting for up to 2% of the US Equity Market daily trading volume.

Future Work

Ideas for future research and work on CoolDB:

  1. Grouping functions
  2. Joining functions (nested-loop, sort-merge, hash)
  3. SQL parser and query optimizer
  4. Partitioning and distributed transactions
  5. Various access and storage methods

Influences

  1. Relational Model of Data for Large Shared Data Banks
  2. System R: Relational Approach to Database Management
  3. Buffer Management in Relational Database Systems
  4. Granularity of Locks and Degrees of Consistency in a Shared Data Base
  5. An Evaluation of Buffer Management Strategies for Relational Database Systems
  6. Starburst Mid-Flight: As the Dust Clears
  7. ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging
  8. ARIES/lM: An Efficient and High Concurrency index Management Method Using Write-Ahead Logging
  9. An In-Depth Analysis of Concurrent B-Tree Algoritms
  10. Order Preserving Key Compression

Licensing

This project is licensed under the Apache License 2.0.