Comments (3)
Hey @MatthewAry I think the RELATE
Statement docs highlights this functionality in detail already.
As this extra shows
The RELATE statement can be used to generate graph edges between two records in the database.
This allows you to traverse related records efficiently without needing to pull data from multiple tables and merging that
data together using SQL JOINs.
Is there any specific type of content you are looking for?
from docs.surrealdb.com.
Yes I saw this. However there is nuance that needs to be explained.
- Is a relation "table" a variant or a superset of a normal table? Or is it the record that's special?
- Why can I define a table that is used for a relation and define field with assert statements, but the the relation table can't do the same things as a table?
- See surrealdb/surrealdb#1424
- See https://discord.com/channels/902568124350599239/1157660156180574238 <- this is a good one. Why can't an edge "table" or record have another edge table/record connected to it?
In other words, I believe there should be documentation that gives more information to clearly explain the functional differences between a relation table and a normal table, because I only found out with experimentation that you can't use the CREATE statement to make a record on a table that has id
, in
and out
fields and be able to use the SurrealQL's graph traversal notation, even though from an outside perspective, it looks like it's making a normal record.
from docs.surrealdb.com.
@MatthewAry I have included a warning for CREATE
, INSERT
, and UPDATE
statements. RE graph relationships. I hope that helps.
Also with regards to the suggestions for a blog post of some sort. I have opened a ticket internal for it many thanks for the prompt. We should have some more improvement in these areas.
Sorry for the delay in action on this.
from docs.surrealdb.com.
Related Issues (20)
- Documentation: Re-write HOT 2
- Documentation: Live Query v2 requires setup before usage
- Documentation: Relate rpc method
- Documentation: GraphQL HOT 1
- Documentation: Update SurrealQL syntax for v2
- Documentation: Typo in `tokenizer/class` explanation
- Documentation: INSERT RELATION HOT 1
- Documentation: Add array::windows() documentation if merged
- Documentation: vector::project docs are identical to vector::normalize
- Documentation: wrong example for BREAK HOT 1
- Bug: Parser error in function definition where argument is optional and of type "any" HOT 1
- Documentation: Error on undefined field HOT 1
- Documentation: Import Command Max File Size
- Bug: CONTAINS not work in some condition HOT 1
- Documentation: wrong example on TOKEN IF NOT EXISTS HOT 1
- Bug: .connect link in Java Documentation links to the wrong paragraph HOT 1
- Documentation: No Node, Bun, Deno, Javascript, Python embedding Documentation
- Bug: Connection problem after upgrading to [email protected] HOT 1
- Documentation: Vector Index HOT 2
- Bug: string::is::email top level domain omission is valid? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.surrealdb.com.