简体   繁体   English

AangoDB:Ghrarial接口与边缘/文档

[英]AangoDB: Ghrarial interface Vs Edges/Documents

独立创建的边/文档与使用gharial接口创建的边/文档有什么区别?

Edges/Documents created through the normal collection API do not know anything of each other, especially if you save an edge it is not checked if their source and target vertices exist, it is just verified that the collections are valid. 通过普通集合API创建的边缘/文档彼此之间不知道任何内容,特别是如果保存边缘,则不检查其源和目标顶点是否存在,只是验证集合是否有效。

If you save documents/edges using the gharial or general-graph module (which is the module gharial uses) you get guarantees over your graph. 如果使用gharial或general-graph模块(gharial模块使用的模块)保存文档/边缘,则可以获得图形保证。 This includes the following: 这包括以下内容:

  • Saving edges verifies that source and target vertices exist and are valid (fitting to the underlying relation definition) 保存边缘验证源和目标顶点是否存在且是否有效(适合基础关系定义)
  • Deleting an vertex triggers a cascade to delete all connected edges known to any graph. 删除顶点会触发级联以删除任何图形已知的所有连接边。

This gives the benefit that you do not have loose ends or orphan edges in your graph which is often required. 这样可以获得图表中没有松散的末端或孤立边缘的好处,这通常是必需的。

The internal storage of edges remains untouched by gharial, so if you save an edge with gharial you could access it with normal document API and vice versa. 边缘的内部存储保持不受gharial的影响,因此如果使用gharial保存边缘,则可以使用普通文档API访问它,反之亦然。 However only saving through gharial gives above mentioned guarantees. 然而,只有通过gharial保存才能提供上述保证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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