Hi Scott,
the advantages of a graph db include the low cost of navigating those
kind of relations. In fact, if you have to follow a link from a node to
another one, the cost for orientdb should be constant time, while in a
Relational DB it's usually O(log N).
The complexity comes from the number of edges starting from your nodes.
Suppose to model this scenario:
- class Person
- class Pizza
- class Ingredient
- edge likes, from Person to Pizza
- edge contains, from Pizza to Ingredient
Your query is: SELECT * FROM Person WHERE out('likes').out('contains').name
= 'mozzarella'.
If "Riccardo", likes 3 Pizzas, each one with 5 Ingredients, orientdb will
have to go through 3 * 5 nodes.
So consider that the more your nodes have outgoing edges, the more your
query will be complex.
Cheers,
Riccardo
2015-06-24 17:05 GMT+02:00 scott molinari <[email protected]>:
> That is really cool. So how far could dot notation and the links go?
> Basically what is the maximum depth? I'd imagine too deep and the
> performance would start to drop? All I am looking for is 3 links away max.
> So, it would mean one more than my example or 3 dots. :-)
>
> Scott
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.