niho / related

A high performance distributed graph database.
MIT License
130 stars 13 forks source link

How could I destroy Relationship? #9

Open jspaper opened 12 years ago

jspaper commented 12 years ago

The relationship still exist in db after destroying node.

Thanks.

niho commented 12 years ago

Yes, that is the intended behavior. You will need to manually destroy the relationships before you destroy the node, since the relationships are two way they may still be important or contain valuable data even if one of the nodes doesn't exist anymore (e.g. a web page is stored as a node in the graph with links to and from other pages as relationships and the page is later deleted, it will still have incoming links from other pages). Maybe I should clarify that in the documentation? And perhaps add an option to auto-delete relationships if it makes sense for a certain use case.