Is it possible to constraint edge multiplicity in Neo4j / OrientDB?
问题 I was wondering whether Neo4j and OrientDB provide the possibility of defining constraints in terms of multiplicity for specific edge types? 回答1: For OrientDB You can set multiplicity on out/in collection per label. Example to set maximum 1 edges from Person to Company if the edge's label is "workFor": ALTER PROPERTY Person.out_workFor NOT NULL ALTER PROPERTY Person.out_workFor MAX 1 You can also set the minimum with: ALTER PROPERTY Person.out_workFor MIN 1 In this way with min & max it's