Skip to main content
A relation is a typed source of biological facts: a table whose columns carry a declared kind, namespace, and coordinate system. The ontology declares 54 of them, and each also fixes its grain, primary key, default order, and recommended filters. Relations are the nouns of the ontology. An RQL recipe begins by importing the relations it needs, and every join connects one relation to another.

Importing a relation

Recipes pull relations in by name. Importing a relation brings its typed columns into scope — nothing about a source is available to a query until it is imported.
The from line names the relation the query starts from; every other imported relation reaches it through the join tree.

The relation families

Relations are organized into families that mirror how biological evidence is produced. These are the sources recipes draw on most often.

Structures

Everything anchored to a solved or predicted 3-D structure.

Sequences

The sequence layer and its bridges into structure.

Evidence

Relationships derived between entities — similarity and contact.

Ligands

Small molecules and their spatial relationship to protein.

Relations are typed, not raw tables

The difference between a relation and the underlying database table is the types. Two relations may both expose a structure_id column, but each column declares its kind and coordinate system — so the ontology knows whether they can be joined directly, need a lossy or range mapping, or must never be compared at all.
One schema, many sourcesEvery relation is validated against one shared, versioned ontology schema before it can be imported. That single schema is what makes a join between two independently produced sources safe to write.
Next: Joins & join safety — how relations are connected, and what the ontology checks before a single row is read.