Home / Companies / SurrealDB / Blog / Post Details
Content Deep Dive

Three ways to model data relationships in SurrealDB

Blog post from SurrealDB

Post Details
Company
Date Published
Author
SurrealDB
Word Count
779
Language
English
Hacker News Points
-
Summary

SurrealDB offers a versatile approach to data relationship modeling, featuring three primary methods: Record Links, Record References, and Graph Edges, each catering to different needs. Record Links provide a straightforward, efficient way to connect records directly without using JOINs or intermediate tables, though they are static and don't automatically update if linked records change. Record References, an experimental feature, allow for bidirectional relationships, enabling reverse visibility without manual joins, though they require enabling and carry certain limitations. Graph Edges, meanwhile, are robust records that store metadata and support complex relationships, offering forward, backward, and recursive traversal, ideal for scenarios requiring detailed metadata and visual schema representation. These tools collectively empower users to model data directly, flexibly, and with comprehensive graph awareness, providing options for simple to complex relational needs within SurrealDB.