Skip to main content

relativedb

Predictive queries over your own relational data. Declare your schema, wire retrievers over the storage you already have, and ask about the future in one line of RelQL — no feature engineering, no training pipeline, no temporal leakage.

PREDICT NOT EXISTS(orders.*) OVER (90 DAYS FOLLOWING)
FOR EACH customers.customer_id

“For every customer, the probability they place zero orders in the next 90 days” — churn, as a query.

A query, not a pipeline

RelQL states the target, the population, and the time window declaratively. Change the question, change the string. Every query is validated against your schema before it runs.

Your data stays yours

GraphQL-style execution: all data access goes through retrievers you implement. No connectors, no credentials, no SQL generation — the same query runs on JDBC, REST, DataFrames, or a test double.

Leakage-proof by construction

Every retriever call carries a temporal bound, and the engine re-checks every returned row. A buggy retriever cannot leak the future into a prediction.

See it in action

Video coming soon

Scored by a relational transformer

A transformer normally attends over word tokens. A relational transformer attends over a small subgraph of your database: each token is one cell, and attention is masked along the structure that relates cells — same column, same row and its FK parents, FK children. No positional encodings; the schema is the structure.

Pretrained across many schemas, it predicts in-context: the engine assembles the entity, its neighborhood, and a few labeled examples (including the entity's own past outcomes), and the model fills in the masked target in one forward pass — the relational analogue of prompting an LLM.

  • vs. GBDTs on feature tables — no hand-built features, no per-task training, no train/serve skew.
  • vs. graph neural networks — no per-schema, per-task training; one pretrained model, prompted in-context.
  • vs. LLMs on serialized rows — typed cells, real keys, and real time instead of tables flattened to text.

relativedb ships RT-J inference as a ~700-line dependency-light C++ engine, golden-verified against the PyTorch reference — and a model-free history baseline so the pipeline runs with zero model artifacts. Read more →

87× faster than the naive loop

Scoring 90-day churn for 10,000 customers over 200,000 orders (history baseline, M-series laptop). Same predictions; the CSC sampler indexes each table once and answers every context hop with a binary search.

relativedb (CSC sampler)
0.66 s · ~15,000 entities/s
Naive per-entity pandas loop
57.4 s · ~174 entities/s

Reproduce with examples/bench_naive_vs_csc.py.