From d24e178cba531bb3fb102d32118b1f1e2efaaca3 Mon Sep 17 00:00:00 2001 From: Dave MacLeod <56599343+Dhghomon@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:04:51 +0900 Subject: [PATCH] Record links now have some advantages that only graphs had previously --- src/content/doc-surrealql/statements/relate.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/content/doc-surrealql/statements/relate.mdx b/src/content/doc-surrealql/statements/relate.mdx index 43263ac4b..0184ed9c5 100644 --- a/src/content/doc-surrealql/statements/relate.mdx +++ b/src/content/doc-surrealql/statements/relate.mdx @@ -19,10 +19,11 @@ Otherwise, edge tables behave like normal tables in terms of [updating](/docs/su Another option for connecting data is using [record links](/docs/surrealql/datamodel/records). Record links consist of a field with record IDs that serve as uni-directional links. The key differences are that graph relations have the following benefits over record links: -- They are kept in a separate table as opposed to a field inside a record. -- Offer bi-directional querying. -- Offer referential integrity. -- Allow you to store data alongside the relationship. +- Graph relations are kept in a separate table as opposed to a field inside a record. +- Graph relations you to store data alongside the relationship. +- Graph relations have their own syntax that makes it easy to build and visualize edge queries. + +Graph relations also offer built-in bi-directional querying and referential integrity. As of SurrealDB 2.2.0, record links also offer these two advantages if they are defined inside a [`DEFINE FIELD`](/docs/surrealql/statements/define/field) statement using the `REFERENCES` clause. For more information, see [the page on record references](/docs/surrealql/datamodel/references). ### Statement syntax