Neo4j: Exploring new data sets with help from Neo4j browser

One of the things that I’ve found difficult when looking at a new Neo4j database is working out the structure of the data it contains.

I’m used to relational databases where you can easily get a list of the table and the foreign keys that allow you to join them to each other.

2013-10-17_21-27-36

This has traditionally been difficult when using Neo4j but with the release of the Neo4j browser we can now easily get this type of overview by clicking on the Neo4j icon at the top left of the browser.

We’ll see something similar to the image on the left which shows the structure of my football graph and we can now discover parts of the graph by clicking on the various labels, properties or relationships.

For example, if we click on the Month label the following query will be executed:

2013-10-18_11-59-49

That query actually returns all the months in the database since there are only 12 in total, but for other queries we’d get back a subset of the nodes/relationships with that structure.

To explore the structure around the months we might explore which relationships it has by running a query like this:

2013-10-18_12-18-54

From running this query we learn that there is a in_month relationship connecting matches to the month that they were played in.

Another useful exploration mechanism is the allShortestPaths function which will show us the path between two nodes if one exists. For example the following query would show us the path between Wayne Rooney and March:

2013-10-18_12-27-12

The text is a bit small but the relationship between Rooney and a match is named played_in so if we want to find which matches Rooney played in in March we could easily write that query.

Another neat feature of the browser is that we can save our queries as we go by clicking on the save button and optionally naming the query in a comment:

2013-10-18_12-37-31

We can then access those queries and re-run them if we want via the star tab on the left hand side:

2013-10-18_12-34-06

You can get a hold of the browser by downloading milestone 2.0.0-M06 about half way down the download page or if you want to hack on the browser it’s on github.
 

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

Leave a Reply


5 × three =



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close