Rel

Rel is a free, open-source, true relational database management system with an advanced query language called *Tutorial D*. Intended for educational purposes and written in Java, it can run on any OS with a Java VM. It uses Oracle’s Berkeley DB as a storage engine, which in turn inherits some of its functionality form SQLite. The user can interact with the database via either the *Tutorial D* language or a visual query language implemented in the Rel application. While Rel currently does not support the entirety of the *Tutorial D* language, it has features for a large subset of it. Using the JDBC driver, it can be incorporated into any application that uses Java, as long as the application doesn’t specify SQL syntax.

History

CJ Date and Hugh Darwen’s [The Third Manifesto](http://thethirdmanifesto.com/) outlines a set of programming language conventions and restrictions that lead to a truly relational database language that also incorporates benefits commonly associated with object-oriented languages. *Tutorial D* is a query language developed by Date and Darwen that meets those specifications, developed for education. Seeing the lack of complete open source *Tutorial D* language implementations, Dave Voorhis released the first version of the Rel database management system in 2004 in order to provide an implementation of Date & Darwen’s specification for instructional purposes.

Checkpoints

Fuzzy

As Rel has Oracle's Berkeley DB as its storage engine, it also uses fuzzy checkpoints.

Concurrency Control

Multi-version Concurrency Control (MVCC) Two-Phase Locking (Deadlock Prevention)

Concurrency control is handled by the storage engine, so the concurrency control protocols in Rel are those that are implemented by Berkeley DB -- namely, MVCC and 2-phase locking.

Data Model

Relational

While the backend storage engine that Rel uses, Oracle’s Berkeley DB, uses the Key/Value and Document/XML models, Rel’s data model is truly relational, as specified by Date & Darwen’s *Tutorial D* syntax.

Foreign Keys

Supported

Foreign keys are not specifically implemented in Rel, since they are not a part of the official *Tutorial D* syntax. However, foreign key relationships are a more specific instance of the language's data constraint rules, so the Rel DBMS still supports foreign keys through its constraint system.

Isolation Levels

Serializable Snapshot Isolation

Isolation levels are handled by the storage engine, so the isolation levels available to Rel are serializable (when Berkeley DB uses pessimistic concurrency control) and snapshot isolation (when it uses MVCC).

Joins

Nested Loop Join Sort-Merge Join

Currently, Rel does not have any optimizations for joins beyond the algorithms used by the storage engine. Thus, in Berkeley DB, the possible join algorithms are those supported by SQLite, and even in SQLite, there is only support for sort-merge join over unique keys.

Query Execution

Tuple-at-a-Time Model

Rel’s storage engine, Berkeley DB, uses SQLite to execute queries. SQLite uses the Tuple-at-a-Time execution model, so Berkeley DB inherits that model, and Rel inherits it from Berkeley DB.

Query Interface

Custom API

The Rel DBMS supports two ways of executing queries. The first is by directly sending queries in *Tutorial D*, where the language interpreter will parse and process them. The second is by using the Rel application's visual query language. Queries made with this are converted into *Tutorial D* and are then fed to the language processor.

Storage Architecture

Disk-oriented

Since Rel uses the disk-oriented Berkeley DB as a storage engine, it is also disk-oriented.

Storage Model

N-ary Storage Model (Row/Record)

Rel’s storage engine is a key-value store. Due to the fact that key-value pairs point to the memory location of an object as well as its size, there is no bound on the length of a data item.

System Architecture

Shared-Everything

Rel consists of two parts: a Rel database server and DBrowser, the client application. The role of DBrowser is to send *Tutorial D* expressions to the server, while the server itself does the actual query processing. Multiple clients can be connected to the same server, but the server itself is a single node, meaning the system is shared-everything.

Rel Logo
Website

https://reldb.org

Source Code

https://github.com/DaveVoorhis/Rel

Tech Docs

https://reldb.org/c/index.php/read/

Developer

Dave Voorhis

Country of Origin

GB

Start Year

2004

Project Type

Academic, Open Source

Written in

Java

Supported languages

Java

Derived From

Berkeley DB, SQLite

Operating Systems

All OS with Java VM

Licenses

Apache v2

Wikipedia

https://en.wikipedia.org/wiki/Rel_(DBMS)