简体   繁体   中英

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.

If you save documents/edges using the gharial or general-graph module (which is the module gharial uses) you get guarantees over your graph. 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. However only saving through gharial gives above mentioned guarantees.

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