I haven't found any functionality to remove relationshiptypes from the
database. Once a relationshiptype is used it seems to remain in the database
forever. This may be proper behaviour when relationshiptypes are relatively
static, but when relationship types are added dynamically, there can exist a
desire to clean-up no longer used relationshiptypes.
Let me give an example.
I am creating path expressions based upon the metamodel module. For example:
Class(article) --> Relationship(author) --> Class(user) --> Property(name)
This path expression can be used to traverse from an article to the name
property of the user that is the author of the article.
The path is stored in the database by taking a cryptographic hash of the string
representation of the path, and use that as a relationship type name. Each
unique path has a unique string representation. Taking a cryptographic hash of
that string representation is for all practical purposes a unique key for that
path.
The start element of the path will have a property with a key equal to the the
cryptographic hash of the string representation of the path (the value is
irrelevant), and each step in the path is represented by a relationship, which
name is equal to the cryptographic hash of the string representation of the
path.
These path expressions may come and go in the application. Some may be long
lived, others will be removed and never be used again. Over time the database
will be polluted with relationshiptypes that are no longer in use, and will
probably never be used again.
Niels Hoogeveen
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user