Gremlin and Apache TinkerPop
Gremlin is a language for graph queries. YouTrackDB implements Apache TinkerPop 3.8, a framework for graph applications. Use Gremlin Server, the driver for remote connections, and the interactive console.
Developed by JetBrains
An object-oriented graph database for Java applications. Developed by JetBrains and used internally in production.
Features
Store objects as vertices and their connections as edges. Query the graph with Gremlin or YouTrackDB Query Language (YQL).
Gremlin is a language for graph queries. YouTrackDB implements Apache TinkerPop 3.8, a framework for graph applications. Use Gremlin Server, the driver for remote connections, and the interactive console.
YQL is the SQL-like query language of YouTrackDB. SQL means Structured Query Language. Use the MATCH statement to describe patterns of connected vertices. YouTrackDB translates supported Gremlin queries into optimized MATCH plans.
Each record has a record ID (RID), an identifier within the database. Edges store RIDs. Traversal follows these links directly without JOIN operations, which combine records by matching values.
A schema defines classes and their properties. Classes can inherit properties from other classes. Polymorphic queries return instances of a class and its subclasses.
Choose schema-less mode for no fixed schema, mixed mode for some declared properties, or full mode for a complete schema.
ACID means atomicity, consistency, isolation, and durability. Transactions apply changes together, preserve database rules, isolate concurrent work, and keep committed changes.
Snapshot isolation gives each transaction a stable view of the database from its start.
Users receive permissions through roles. Predicate-based security policies use conditions to control access to each record.
Optionally encrypt data on disk with the Advanced Encryption Standard (AES).
Use the same application programming interface (API) inside your Java process or through a remote connection. Docker images provide packaged environments for the server and console.
Create full and incremental backups. A full backup starts a backup chain. Incremental backups add changes to that chain. Restore from the full backup and its following increments.
Get started
Use Java Development Kit (JDK) 21 or later.
Maven manages Java dependencies.
Add this dependency and snapshot repository to your pom.xml file.
A snapshot is a development version.
<dependency>
<groupId>io.youtrackdb</groupId>
<artifactId>youtrackdb-embedded</artifactId>
<version>0.5.0-SNAPSHOT</version>
</dependency>
<repositories>
<repository>
<name>Central Portal Snapshots</name>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
This example creates an in-memory database. It connects a person to software they created. The transaction commits when its function completes.
import com.jetbrains.youtrackdb.api.DatabaseType;
import com.jetbrains.youtrackdb.api.YourTracks;
public class ReadmeExample {
public static void main(String[] args) throws Exception {
try (var ytdb = YourTracks.instance(".")) {
ytdb.create("tg", DatabaseType.MEMORY, "superuser", "adminpwd", "admin");
try (var newTraversal = ytdb.openTraversal("tg", "superuser", "adminpwd")) {
newTraversal.executeInTx(g -> {
var v1 = g.addV("person")
.property("name", "marko").property("age", 29).next();
var v2 = g.addV("software")
.property("name", "lop").property("lang", "java").next();
g.addE("created").from(v1).to(v2).property("weight", 0.4).iterate();
});
}
}
}
}
Use these credentials only for this local example.
Explore the Java examples →With Docker installed, run the interactive console:
docker run -it youtrackdb/youtrackdb-console
Read the documentation →
Project status
YouTrackDB has a weekly beta release schedule. Beta releases are prerelease versions for evaluation. Release checks can skip weeks without product changes.
Find beta releases on Maven Central, Docker Hub, and GitHub Releases.
Benchmarks
The benchmarks are based on workloads from the Linked Data Benchmark Council (LDBC). These workloads model queries on connected data.
View the benchmark results →