Skip to main content

StarfishQL Concepts

Before diving into the details, it's important to grasp the following fundamental concepts in a high-level sense:


e.g. Crate

Data to be stored and processed that is meaningful in itself.

Within the database, entities can be homogeneous (as in the example, all are simply "crates") or heterogeneous (say we distinguish between "library crates" and "application crates" and represent them as different entities).


e.g. serde, rand, sea-orm

An instance of an Entity.


e.g. Depends

Relation between entities. It can be directed or undirected (equivalent on both directions).1


e.g. sea-orm -depends-on-> serde

An instance of a relation. A connection between two nodes.


A data structure containing a set of nodes N and a set of edges E, where E must only use the nodes in N.


e.g. version

Quantities (numeric, scaler values) and qualities (categorical, enum labels) attached onto each node or edge.2


A description of the data we want to extract from the database.

The query result can be a graph, a vector (of nodes) or a scaler value.


e.g. Traverse up to 3 levels deep, Only include nodes with at least 3 edges

When performing a query, the requirements of graph traversal or criteria on the topology.


e.g. version = "0.0.1"

When performing a query, the filters applied to the nodes and edges (usually on attributes).

  1. So far, development has been centred around directed graphs. Hence, some functionalities have not been thoroughly tested for undirected graphs.
  2. Only node attributes are supported for the time being.