TerminusDB is based on the
RDF standard. This standard specifies finite labelled
directed graphs which are
parameterized in some universe of
datatypes. The names for nodes and labels are drawn from a set of IRIs (
Internationalized Resource Identifiers). TerminusDB uses the
XSD datatypes as its universe of concrete values. For
schema design, TerminusDB used the
OWL language until version 10.0. Since version 10 it uses a JSON schema interface allowing users to build schemas using a simple JSON format. This provides a rich modelling language which enables
constraints on the allowable shapes in the graph. TerminusDB has a promise based
client for the
browser and
node.js it is available through the
npm registry, or can be directly included in web-sites. It also has a
Python client for the TerminusDB
RESTful API and a python version of the web object query language, WOQLpy.
Query language GraphQL is implemented to allow users to query TerminusDB projects in such a way that deep linking can be discovered.
WOQL (web object query language) is a datalog-based query language. It allows TerminusDB to treat the database as a
document store or a graph interchangeably, and provides query features to make relationship traversals easy. This gives a relatively straightforward human-readable format which can be easily stored in TerminusDB itself.
Example A simple query which creates a document in the database, along with labels and
cardinality constraints. WOQL.doctype("BankAccount").label("Bank Account") .property("owner","xsd:string") .label("owner") .cardinality(1) .property("balance","xsd:nonNegativeInteger") .label("owner") .cardinality(1) == References ==