Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-12-2019 01:55 PM
Hello. I'm a complete graph db newbie here. I am playing with keeping track of what I talk with my friends about. Here is an example of what I want to track and an idea of how to model it. How does this look? Thank you for any advice.
I called Dan. We talked about ABC.
I texted Dan about 123.
I just remembered Dan is interested in learning photography.
Julia called Sara.
-exploded: Julia placed a call on her phone to Sara.
--what I would track in Neo4j
---who communicated (Julia and Sara)
---when was the communication
---what was discussed (“XYZ“)
Julia told me she and Sara both talked on the phone about XYZ
-exploded: Julia spoke to me in person and conveyed that Julia placed a call on her phone to Sara and Julia and Sara both talked about XYZ
-what I would track in Neo4j
--who communicated (Julia and I)
--when was the communication
--what was discussed:
---Julia spoke to Sara on the phone
---when was the communication
---what Julia and Sara discussed ("XYZ")
One idea is…
Person: Me
Relationship: CALLED which will have a property 'notes' where I can write what we talked about.
Person: Dan
MATCH (a:Person),(b:Person)
WHERE a.full_name = “Me” AND b.full_name = "Dan Smith"
CREATE (a)-[r:CALLED{
node_created_timestamp: datetime(),
UUID: apoc.create.uuid(),
notes: “Dan “& I talked today about ABC"
}]->(b)
RETURN r
MATCH (a:Person),(b:Person)
WHERE a.full_name = “Me” AND b.full_name = "Dan Smith"
CREATE (a)-[r:TEXTED{
node_created_timestamp: datetime(),
UUID: apoc.create.uuid(),
notes: “I texted Dan about 123"
}]->(b)
RETURN r
12-12-2019 02:19 PM
So for every communication between two people you will add a new edge between them?
12-12-2019 06:36 PM
Thanks for the reply. Yes, I think my model indicates every time I want to write down what a friend and I talked about, I would make a new relationship between my node and their node and use a property in that relationship to write what we spoke about.
I would be happy to hear any advice on that from folks with more experience.
Thank you
All the sessions of the conference are now available online