Getting started

Installation

OntoDB is C++20 built with CMake and Ninja. It needs raptor2 to parse RDF and downloads GoogleTest at configure time.

Prerequisites

ToolVersion
A C++20 compilerClang 14 or newer
CMake3.21 or newer
Ninjaany recent version
raptor22.0 (RDF parsing)
pkg-configany

macOS (Homebrew):

brew install pkgconf raptor cmake ninja

Ubuntu:

sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libraptor2-dev

Build

git clone https://github.com/lamng3/OntoDB.git
cd OntoDB
cmake --preset dev && cmake --build --preset dev

This produces two programs in build/dev/: ontodb, the shell, and ontodb_test, the test suite.

PresetBuildUse it for
devDebug with AddressSanitizer and UndefinedBehaviorSanitizerEveryday work
tsanDebug with ThreadSanitizerAnything concurrent
releaseOptimizedBenchmarks

Check the build

./build/dev/ontodb_test

Every enabled test should pass. Tests for features that are not built yet are disabled and reported as such; see Development.

Run

./build/dev/ontodb            # an in-memory database that keeps nothing
./build/dev/ontodb mydb       # a persistent database in the directory mydb
./build/dev/ontodb --strict mydb

--strict refuses to open a database whose log is damaged, instead of recovering the valid part. See Recovery on open.