Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-07-2020 10:41 AM
Hi all!
Three nodes: PERSON (each user), TOPIC1 and TOPIC2
A PERSON should be able to subscribe to TOPIC1 and TOPIC2.
TOPIC1 should be able to be linked to TOPIC2 by any PERSON. When this occurs I would like the person to be able to define the strength of the relationship, using a numerical value of 1-10. Any person should be able to do this for any two topics (multiple people could do for the same relationship).
I would like to be able to aggregate the count of the number of people who have linked two topics together. I would also like to be able to sum the 1-10 strength all people have assigned to this particular relationship.
What would be the best way to do so?
Cheers!
01-07-2020 12:30 PM
Do you need to track which person made the relationship or when they made it? Or possible give them the ability to remove the relationship they added or modify the strength?
Generally speaking when adding properties to relationships in most scenarios I've encountered eventually they end up getting moved out to their own node for either model clarity or performance reasons.
I'm not sure what in your domain, the relationship between the TOPIC nodes represent, but you might consider add a new node when the person performs this association (maybe call it a "BINDING" node), which has a strength property and a relationship to each of the 2 topics. Then you could also associate it to the Person node that created the binding, so then you can also list/delete/modify all the BINDING nodes from a Person. You could also store additional metadata about when the binding was created, etc. Then you can sum the values of the strength property of each of the BINDING nodes between any 2 topics.
01-08-2020 09:19 AM
Thanks (20 characters)
All the sessions of the conference are now available online