符合 neo4j 中的模式

Compliance to a schema in neo4j

我正在考虑使用图形数据库来存储IFC data. Ideally, the DB should provide a way to define all the rule types defined in the IFC schema. However, I don't think there are any such databases because some of the rule types in IFC are very complex and requires querying the DB. Others are simple, like uniqueness of GUID, existence of mandatory attributes, or data validation。 Neo4j 似乎有一些约束执行方法:

Neo4j helps enforce data integrity with the use of constraints. Constraints can be applied to either nodes or relationships. Unique node property constraints can be created, as well as node and relationship property existence constraints.

是否有其他方法可以确保输入的数据符合预定义架构?

或者还有其他更适合这份工作的图数据库吗?

您几乎可以通过创建事务事件处理程序来实现您想要的一切。

http://neo4j.com/docs/java-reference/current/javadocs/org/neo4j/graphdb/event/TransactionEventHandler.html

您还可以查看 GraphAware Framework and all its submodules 用例以及创建和部署 neo4j 扩展的简易性。

取决于您是否需要数据库本身强制执行的架构,或者您是否同意在应用程序层执行此操作。

我刚刚 Restagraph 达到 "working prototype" 水平,我的下一个技巧是 Docker 实现它。 它是一种框架,使您能够通过在 Neo4J 中使用特定标签创建节点和关系来定义模式,并动态创建 REST API 来执行它。

它也是用 Common Lisp 编写的,所以如果您等待 Docker 图片,我会理解的:)