Graph-Style Relationships in SurrealDB

Поделиться
HTML-код
  • Опубликовано: 12 ноя 2024

Комментарии • 24

  • @marc9937
    @marc9937 7 месяцев назад +19

    This short-form video series content is amazing! Keep it up!💪

    • @SurrealDB
      @SurrealDB  7 месяцев назад +3

      Many thanks for the feedback. Stay tuned for more content!

  • @jeffg4686
    @jeffg4686 7 месяцев назад +7

    Oh yeah - as someone whose spend a lot of time in relational databases, this is PLEASANT

  • @TidusUltimate
    @TidusUltimate 7 месяцев назад +8

    Really nice job. Love this kinda content. Short, concise and very helpful. Cheers my dude

    • @SurrealDB
      @SurrealDB  7 месяцев назад +2

      Thank you for the feedback.

  • @gariklaw
    @gariklaw 7 месяцев назад +6

    Yes! Show us how it's done 🙏 Looking forward to more to come

    • @SurrealDB
      @SurrealDB  7 месяцев назад

      Thanks for the comment. Stay tuned for the next video.

  • @DaggieBlanqx
    @DaggieBlanqx 7 месяцев назад +4

    Great content. Thank you.

    • @SurrealDB
      @SurrealDB  6 месяцев назад

      Glad you enjoyed it!

  • @FarofWell
    @FarofWell 7 месяцев назад +4

    Like!

  • @Cadambank
    @Cadambank 4 месяца назад

    Hey man, I have a question. For the last query you had written, along with what products where purchased at the end can we get also how many times those products were purchased? How would you modify the query for that?

    • @SurrealDB
      @SurrealDB  4 месяца назад

      My first instinct would be to do this:
      SELECT
      array::len(->order->productproduct) AS number_of_products,
      ->order->productproduct.name AS product_names
      FROM person:00g8os512h0k7l19p05g
      Since array::len is not an agg function just gets the length of the products array it doesn't need a group by and you can get both in one query.
      If you'd need to use an agg function I'm pretty sure you'd need to do two queries, one for the agg function and one for non agg product list.

  • @casperon7
    @casperon7 7 месяцев назад +2

    Awesome stuff, would be great if you could cover define schemafull;

    • @SurrealDB
      @SurrealDB  6 месяцев назад

      Thanks, we value your suggestion. This has been fed into our team for consideration.

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x 7 месяцев назад

    i know we can set additional fields during relate statement.. to me the relate table generated kinda looks like a fact table should i treat it that way? or keep it only with simple in and out
    i guess i was looking for a single in then multi out.

    • @SurrealDB
      @SurrealDB  7 месяцев назад

      Whether its a dim or fact table depends on how you want to model your data. You can only have a single in and out for each query, but the table can have many in's and out's depending again on how you want to model your data.

    • @user-qr4jf4tv2x
      @user-qr4jf4tv2x 7 месяцев назад

      @@SurrealDB i see so there not really a preferred way but only on the devs preference.. thank you

    • @AnimeZone247
      @AnimeZone247 3 месяца назад

      @@SurrealDBis there a way to subscribe to graphs, so I can get realtime notifications of database changes?

    • @SurrealDB
      @SurrealDB  3 месяца назад

      Hi @@AnimeZone247 , yes, you have three options for that. You can use a Live Query (surrealdb.com/docs/surrealdb/surrealql/statements/live), custom events (surrealdb.com/docs/surrealdb/surrealql/statements/define/event) or Change Feeds (surrealdb.com/docs/surrealdb/surrealql/statements/define/table#using-changefeed-clause).

  • @MesoCarib
    @MesoCarib 2 месяца назад

    A graph database without a graph? Where are the graphs showing circles (nodes) with relationships or connections (edges) to other circles (nodes)? ArangoDB has that.

    • @SurrealDB
      @SurrealDB  2 месяца назад

      Hi, many thanks for your question. We have a visual graph, you can find it in the designer view in our Surrealist interface.
      However, since we are a multi-model database, you won't find lines and circles, but rather tables connected to other tables.

  • @jeffg4686
    @jeffg4686 7 месяцев назад +1

    when do we get text-to-surrealql?

    • @SurrealDB
      @SurrealDB  7 месяцев назад +3

      Hi, thanks for your question. Text to surrealQL is not currently on our roadmap. But, you can checkout the awesome surreal repo where you can find most of SurrealDB’s community projects: github.com/surrealdb/surrealdb

    • @jeffg4686
      @jeffg4686 7 месяцев назад

      @@SurrealDB = wrong answer...