Learn
Relationships
Relationships connect RushDB records into a traversable graph. They are named, directed edges between records, not foreign-key columns or application-side joins.
You can create relationships explicitly, generate them automatically from nested JSON imports, connect large datasets by matching keys, and filter records by traversing one or more hops inside a where clause.
Choose a Workflow
| Goal | Guide |
|---|---|
| Attach or detach individual record pairs | Connect Records |
| Connect many records by matching keys | Bulk Relationships |
| Review and approve inferred graph structure | Suggested Patterns |
| Create parent-child edges while importing nested JSON | Import Data |
| Filter through related records | Relationship Traversal |
Relationship Sources
| Source | What it creates |
|---|---|
| Nested JSON import | Default parent-to-child edges as RushDB decomposes the payload |
attach / detach | Explicit edges between known record IDs |
| Bulk relationship APIs | Edges between matching source and target records |
| Approved relationship patterns | Explicit edges inferred from ontology structure and reviewed before application |
Relationship types and direction are optional when traversing broadly and explicit when your query needs a specific edge contract.
Related Sections
- Records & Queries — store and retrieve the records relationships connect
- Labeled Meta Property Graph — understand record, property, and relationship layers together
- SearchQuery Reference — full traversal syntax