Modeling posts and users and how they're connected

I have Posts and Users in what I'm thinking is so far a social network graph. Users can author Posts. Users can follow other users.

Assuming a user follows another user who just made a post, do you create that relationship?

Like do you say, for all followers of the author, mark a relationship between their Post and that User?

My thought process is just, when you want to get all Posts for people you follow, those relationships should be already? Is that silly?

If you can draw a picture on a white board with circles being nodes and arrows being relationships, you can build it in Neo4J (with a bit of programming and/or data importing.)

So, here Nodes would be User and Post, relationships would be User WROTE Post, User FOLLOWS User.

The queries you can do follows (fairly) naturally from the picture once you get the hang of it.

Hi @geronimo4j,

Here is the initial draft version of the schema -

call db.schema.visualization()
image

I have created some JSON schema in https://github.com/dominicvivek06/neo4j/tree/master/community/data_model_userpost

"Assuming a user follows another user who just made a post, do you create that relationship?" -> Is this automatic, or only when the user wants he will follow the other user ?