Social Networks Neo4j
A social network modeled as a graph database: NoSQL comparison, Neo4j model, synthetic dataset and Cypher queries.
Context
Supervised project of the BUT in Computer Science, “Study and experimentation of a NoSQL service”. The brief was to choose a NoSQL service suited to a social network, justify the choice, then test it on a purpose-built dataset.
Team and my role
Group project, 3 people.
I was responsible for the comparative analysis of NoSQL solutions and co-designed the data model.
Approach
- Preliminary study: comparison of Neo4j, MongoDB and SPARQL, then choice of Neo4j, because a social network’s value lies in its relationships.
- Model: property graph with uniqueness constraints and indexes, covering users, posts, interactions, groups and reports.
- Generation: reproducible Python script with a fixed seed, themed communities and influencer accounts to produce a realistic graph.
- Experimentation: import into Neo4j Aura, then Cypher scenarios for insertion, querying, aggregation, update and deletion, including recommendations through paths of length 2 to 3.
Visuals
Facts and figures
- and 10 populated relationship types
- 7 labels
- across 5 communities
- 3,000 users
- and 8,000 comments, over 1 simulated year
- 5,000 posts
- out of 109,067 relationships in total
- 61,887 FOLLOWS
- compared before choosing, Neo4j, MongoDB and SPARQL
- 3 solutions
What I took away
The main challenges and lessons came from managing the project and from setting up the initial requirements.





