Using Neo4j graph database in social network analysis

Łukasz Warchał


This article describes how Neo4j database capabilities can be utilized to implement measures often used in social network analysis. It gives a brief overview of the concept of Neo4j graph database. The UML class diagram of domain model is presented and discussed in details. On the basis of implementation of degree centrality and local clustering coefficient measures, several Neo4j core features are presented. In the summary, some general comments on using this database as a tool in a social network analysis are provided.


graph database; nosql; social network analysis; neo4j

Full Text:



Wasserman S., Faust K.: Social Network Analysis: Methods and Applications. Cambridge University Press, New York 1994.

Hanneman R. A., Riddle M.: Introduction to social network methods. University of California, Riverside CA 2005.

Chakrabarti D., Faloutsos Ch.: Graph Mining: Laws, Generators, and Algorithms. ACM Computing Surveys, Vol. 38, Article 2, March 2006.

Han J., Haihong E., Le G., Du J.: Survey on NoSQL database. In Proc. of 6th International Conference on Pervasive Computing and Applications (ICPCA), October 2011, p. 363-366.

Angles R., Gutierrez C.: Survey of graph database models. ACM Computing Surv. 40, Vol. 1, Feb. 2008, p. 1-39.

Neo4j Graph Database,

The Neo4j Manual,

Hatcher E., Gospodnetic 0.: Lucene in Action. Manning Publications, 2004.

Apache Lucene,

Segaran T., Evans C., Taylor J.: Programming the Semantic Web. O'Reilly Media 2009, p. 84-96.

Pollak D.: Beginning Scala. Apress, 2009.

Opsahl T., Agneessens F., Skvoretz J.: Node centrality in weighted networks: Generalizing degree and shortest paths. Social Networks, Vol. 32, 2010, p. 245-251.

Freeman L.C.: Centrality in social networks: Conceptual clarification. Social Networks, Vol. 1, 1978, p. 215-239.

Holland P. W., Leinhardt S.: Transitivity in structural models of small groups. Comparative Group Studies, Vol. 2, 1971, p. 107-124.

Watts D. J., Strogatz S. H.: Collective dynamics of small-world networks. Nature, Vol.393, 1998,p.440-442.

Opsahl T., Panzarasa P.: Clustering in weighted networks. Social Networks, Vol. 31, 2009,p. 155-163.

Newman M. E. J.: The structure of scientific collaboration networks. PNAS 98, 2001, p. 404-409.