In another thread today, I defended the schemaless nature of Neo4J, however I
believe there is one area where Neo4J has some sense of schema, which could use
some improvement in my opinion, the RelationshipType.
Whenever creating a typing layer on top of Neo4J, some duplication of
functionality will be introduced with regard to RelationshipTypes.
There is the RelationshipType in core, which is basically a name,
and there will be a node in the typing layer, which will represent that same
RelationshipType as a node.
Linking these two RelationshipTypes needs to be done by means of the Lucene
index, which is not necessarily the fastest operation.
Would it be possible to reify the RelationshipType as a node in core, so
relationshiptypes can be traversed. Different typing layers can then use that
node to add additional information to the relationship (for example stating the
transitivity, symmetry, reflexivity of the relationship, or whether the
relationship is functional, injective or one-to-one, or the domain and range of
the relationship).
Different typing layers may implement the relationshiptype differently, but
having a node to attach this information to would suffice for all possible
scenarios.
The creation of a RelationshipType-node, can even be done lazy,
so Neo4J users that don't need a RelationshipType-node won't be bothered with
additional nodes in the database.
Niels
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user