tariqdaouda
tariqdaouda

Reputation: 2516

ArangoDB: (1 Graph with several Edge Definition) Vs (1 Edge Definition per Graph)

I was wondering if there is any advantage to having several edges definition in one single graph Vs having several graphs each one with a single edge definition.

Thanks for you help,

Upvotes: 7

Views: 225

Answers (1)

moonglum
moonglum

Reputation: 786

There are different reasons for using multiple edge definitions instead of only one:

  1. To show differences in content: You may want to have different edge collections for bought and watched. This is also possible by using a label however and comes down to personal preference.
  2. Edge definitions allow you to restrict the collections on the in and on the out side of the edges. So you can for example say that your bought transitions always start in a document for the people collection and go to the product collection. You would otherwise need to do that inside of your application.

Upvotes: 8

Related Questions