简体   繁体   中英

ArangoDB Creating counter edge for every directed edge for bidirectional edges

I am very new to graph database. And I have started with Arango. For this project I am not sure about the queries that I will encounter in future. I don't want to create bottlenecks. So I wanted to create undirected or bidirectional edges everywhere.

However as only directed edges are supported my current understanding is that if some vertex is not reachable by a directed traversal then I'll hit a bottleneck later. So whenever I am creating an edge a -> b I am also creating b -> a in the same edge collection.

Are my assumptions correct ? and Is the design decision acceptable ?

While edges are always directed, you can choose to ignore the edge direction in a traversal by using ANY :https://www.arangodb.com/docs/stable/aql/graphs-traversals.html

  • OUTBOUND to follow an edge in its defined direction ( _from_to )
  • INBOUND to follow in the opposite direction ( _from_to )
  • ANY to follow regardless of the edge direction, inbound and outbound ( _from_to )

图中的遍历方向

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM