Warm tip: This article is reproduced from serverfault.com, please click

How can you define and enforce a Neo4J graph's schema?

发布于 2013-02-03 19:09:12

I want to achieve, with a Neo4j graph a RDBMS's ability to define and enforce a known schema. We know what our graph should look like (all the edge types and node types). So we simply want to prevent someone (developer/user) from adding an edge or node type which is "invalid" i.e. not part of the defined graph schema. How can we enforce a graphs schema? Note I am not asking about how to enforce the properties of an edge or a graph but simply how to enforce that the graph is made up if a specific set of known edge and node types. Please help

Questioner
BestPractices
Viewed
0
Eve Freeman 2013-02-04 03:32:08

This should probably be done on the application side. Build a wrapper/API that enforces this sort of thing, and make the developers use it. Sorry for the short answer...