Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-16-2020 09:31 PM
When creating an app like a family tree, I want to prevent the user from creating relationships that will create a cycle. Is it possible to tell if a transaction will create a cycle before committing?
08-16-2020 02:00 PM
li3zhang, welcome to the community! Love the question as I love graph theory
Given a family tree is a directed graph (i.e., a father of a son is not a son to a father for the same two nodes), getting a cycle will be impossible. Certainly, someone's cousin can be another persons brother and this can result in a "cycle" if you ignore direction and relationship type. But I would contend that finding cycles by ignoring relationship type and direction would be very useful and desired in terms of insights in your tree - especially before the royal wedding
Am I missing something or is that helpful?
HTH
All the sessions of the conference are now available online