As you can see there is no fundamental difference. They are both documents. Edge collections are only useful for when you using Arango for it's graph database capabilities. As I understand it, the point setting the type of the collection to "edge" tells Arango that it should be ensuring that all documents stored in there minimally have _to and _from attributes so that the document can serve its function as a connector between two other documents. Once you have a document collection whose documents are connected by a bunch of edge documents in an edge collection... now you have a graph.
2条答案
按热度按时间qmelpv7a1#
ArangoDB中的图形是在文档和边缘之上构建的。
边缘集合在
_from
和_to
上有自动索引,允许有效检索任何连接的文档。因为数据仍然存储在常规(文档和边缘)集合中,所以您也可以在非图形查询中使用这些集合。图表在数据的顶部添加了一些功能(例如查询方法、遍历)。在ArangoDB中可以有多个图表。可以将“图表”看作是对部分或全部数据进行分组的一种方法,并使它们在查询中可访问。
p5cysglq2#
This is an edge:
This is a document:
As you can see there is no fundamental difference. They are both documents. Edge collections are only useful for when you using Arango for it's graph database capabilities.
As I understand it, the point setting the type of the collection to "edge" tells Arango that it should be ensuring that all documents stored in there minimally have _to and _from attributes so that the document can serve its function as a connector between two other documents.
Once you have a document collection whose documents are connected by a bunch of edge documents in an edge collection... now you have a graph.