What I learned about Neo4j in 48hours

This blog post will discuss what you can learn in 48 hours of reading about Neo4j. We’ll also discuss why graph databases are useful and how to use them. Finally, we’ll give a summary of the fundamentals of Neo4j.

Graph database systems have been around for over 20 years, but they’re just now starting to get adopted by businesses because their benefits are so immense! For example, graphs are great for modelling relationships between entities, which relational databases struggle with due to constraints on tables independent of one another. In this blog post, I hope to show you the power of graph databases through some examples and reveal some tips for getting started with Neo4j yourself!

What is Neo4j?

Neo4j is a graph database that was released in 2007. It’s open-source and written in Java. It stores data as nodes (entities) and relationships between them. Neo has become very popular lately because it solves problems with traditional relational databases, such as scalability, performance, and flexibility when modelling data.

What are people using Neo4j for?

People use Neo for all sorts of things! A few examples include: tracking social media data, managing customer relationships, detecting fraudulent behaviour, and modelling the human brain. The possibilities really are endless when it comes to graph databases and their applications!

Neo4j Fundamentals

Before we get started with Neo4j, let’s take a quick look at some fundamentals. A graph consists of nodes (entities) and relationships between them. In Neo, nodes are stored in a property called “labels”, and relationships are stored as “properties”. Here’s an example:

We can see that there are two nodes: “Person” and “Movie”. There are also two relationships: “ACTED_IN” and “DIRECTED”. Neo4j stores node data as a label, simply a string value. In the example above, we can see that both nodes have labels of Person and Movie, respectively. On the other hand, Neo4j uses properties to store relationship data. This allows us to store richer data about relationships. For the above example, the Person (Tom Hanks) “ACTED_IN” the Movie node (Forrest Gump). Also, Person (Robert Zemeckis) “DIRECTED” the Movie node (Forrest Gump)

So far, so good? Let’s move on and take a look at some of the other fundamentals of Neo!

Graph Building Blocks

In a graph, nodes typically have the same set of properties. This includes labels and values for relationships between them! In Neo, all these building blocks are exposed through the Cypher query language. We can use this to add or update data from our application into Neo’s database. Querying a graph database is as simple as issuing cypher queries against the database!

Cypher

The Cypher query language was designed specifically for Neo4j. It’s used to query and update data in Neo’s graph database. Cypher allows us to write complex queries easily and has rich features that make it perfect for working with graphs. Let’s take a look at some cypher queries and what they do:

Here, we can see that Cypher uses keywords like CREATE to create (self-explanatory, right?) a node. Then, we use properties such as name to define our node

Now that we’ve introduced some of the fundamentals, it’s probably time for us to dive in and start trying out Neo ourselves! So let’s look at how you can get started with Neo…

Getting Started With Neo4j

Neo4j is open source which means there are tons of resources available online. Here are a few useful ones:

Neo Documentation — This documentation page contains great information about Neo and its query language, Cypher. It also has some examples of how to get started!

Stack Overflow — Stack overflow is always an invaluable resource when you’re learning something new or stuck with something difficult in your code. Many Neo4j developers on Stack Overflow can help you out if you ever get stuck!

Gitter — Gitter is a great place to chat with other community members and ask questions about Neo. If you have something specific or need some assistance, start. This is a good place!

Neo4j on the browser — Neo4j now has a version that runs on your computer or server, which you can deploy inside your own network. This is an easy way to get started using Neo!

Neo Learning Resources

For those interested in learning more about graph databases and their applications, there are plenty of resources available online:

Graph Databases — If you want to learn more about graphs and their applications, this is a great place to start! It covers the basics of graph databases and how they’re used.

Introduction to Neo4j — This tutorial provides a basic introduction to Neo. It covers installing Neo4j, creating nodes and relationships, querying data, and more!

Graph Algorithms — This page lists graph algorithms useful for Neo4j. Some examples include the shortest path, connected components, and triangle counting!

Getting Help

As with any open source project or product, it’s good to be able to rely on the community when you need help! The following resources can be helpful when you need assistance with Neo:

Gitter — As mentioned before, Gitter is a great place to chat with other community members and ask questions about Neo. So, if you have something specific or need some assistance, start. This is a good place!

Stack Overflow— Stack overflow is always an invaluable resource when you’re learning something new or stuck with something difficult in your code. Many Neo developers on Stack Overflow can help you out if you ever get stuck!

The Neo4j forum is a great place to ask questions and search for answers about anything related to Neo. This is a good resource if you’re having trouble with a specific topic or need help with a problem.

Neo on the browser — Neo now has a version that runs on your computer or server, which you can deploy inside your own network. This is an easy way to get started using Neo!

I'd like to think of myself as someone who analyzes data, deduces meaning, and then threads it all together to create coherent visual narrative.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Chingu Senior Dev Guest AMA No. 1

Make your Android app compatible with your Chromecast

Laugh Tracks a Turing Project

Defensive PowerShell with Validation Attributes

BornBadBoard, did you say BornBadBoard ?

Algorithm: Selection Sort

Technical Debt — The Number One Reason Why Software Development Projects Get Derailed

My Experience Building the First Government-owned Medical Software Using Micro-Services…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
cengkuru michael

cengkuru michael

I'd like to think of myself as someone who analyzes data, deduces meaning, and then threads it all together to create coherent visual narrative.

More from Medium

From Sensing to Sensemaking: Analyzing, Visualizing, and Modeling New York City’s Buses

Data Visualization (told for dummies)

Introducing Qlik AutoML

Text mining monetary policy communication using AWS and R