Search This Blog

Saturday, 5 May 2018

Neo4j - extracting some schema information using Cypher queries

Since schema is not a compulsion with Neo4j, I was looking at ways to get information on the type of nodes and relationships in the database.
These below are not my own queries. I came across a good link and decided to use it here.
The below java code when executed against a database collect information on the type of nodes, relations and combinations seen in the database.

Neo4j - Extracting relationship properties

Neo4j relations can also have their own properties. In the sample movie database, the ACTED_IN relationship has a roles property, which can take multiple values (An actor may play multiple roles in a Movie).
Here I take a look at accessing these values from Java.

Neo4j - Identifying a Nodes Label and a Relations Type

I wanted to find out which all person nodes are associated to a given Movie and in what roles. Consider that my Movie database has several relations -
Person acted in a movie
Person directed a movie
Person reviewed a movie
Person followed a movie ......... and many more.

Monday, 27 March 2017

Neo4j - Traversing along the directions of a Relation

Neo4j Relationships are what connect any two nodes in the graph.  To copy paste from the Neo4j guide:
Relationships organize nodes into arbitrary structures, allowing a graph to resemble a list, a tree, a map, or a compound entity — any of which can be combined into yet more complex, richly inter-connected structures.

Friday, 3 June 2016

Neo4j - Retrieve records via Cypher

I had the chance to do a project in big data using Graph databases. Then we had used Neo4j and managed to learn quite some stuff - through hack techniques. Nevertheless our short stint with Graph databases was quite enjoyable and I decided to explore Neo4j once more.