Giter VIP home page Giter VIP logo

Comments (3)

Ekwuno avatar Ekwuno commented on August 21, 2024

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.

MatthewAry avatar MatthewAry commented on August 21, 2024

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.

Ekwuno avatar Ekwuno commented on August 21, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.