Try a Neo4j graph database here, now

What does a graph database allow you to accomplish that another type of database won’t? A Neo4j graph database allows you to analyze, experiment and accurately estimate the levels of relationship, influence and impact that data elements (“nodes”) have on each other .

In other words, a graph database is the right tool to use when the purpose of your survey isn’t just to recall data you’ve already stored, which existing database structures do enough. good. It’s about assessing the depth, degrees, and integrity of the relationships within your data elements and pointing the way to the solution you’re looking for.

A regular database is there to recall. A graph database is there to solve.

See now

Under a special agreement with The New Stack, Neo4j has set up a testbed for you to try out using a fully pre-built Neo4j AuraDB cloud-based open-source graph database engine. completed. Your AuraDB console will open in a new tab, so you can read here while you try things there. You don’t need to register or enter your name first. However, we hope you sign up after learning how Neo4j works and how it can play a problem-solving role in your organization that you may not have considered before. But first, we want you to use Neo4j to see what it does and how it works.

Click here to immediately put Neo4j AuraDB to work.

Now you see it

You may know how to use a browser or database console where you establish a connection to a database, enter SQL commands directly into a command line, and see the results in a drop-down window. The Neo4j tool on the Test Drive page, conceptually speaking, is not that different. Of course, at the moment it is designed to be used with one of three pre-imported sample datasets. The fully cloud-based Neo4j AuraDB engine uses its own full-scale browser.

Here’s what you’re looking at: StackOverflow, as you may know, publishes its complete and up-to-date data about the questions its users have asked and their answers, in portable data formats. It’s a huge database, so for the purposes of the Test Drive page, we pulled data around a set of 300 questions asked and answered on the Neo4j database.

The first test query you see when the Test Drive page opens is a statement written in Cypher language, not SQL. A Cypher request asks Neo4j to reveal all knots (data entities represented in the graph by circles) whose relationships with other nodes match a pattern. It can be a very complex pattern, although it’s quite simple here. Cypher uses special characters to help you draw these patterns in the instructions as if they were ASCII art.

Here is that Cypher query up close:

As you know, the main keyword in SQL for specifying data to retrieve from a set is SELECT. Its Cypher counterpart is MATCH. Inside this MATCH statement, you can see where the parentheses ( ) enclose elements (nodes) that would be inside circles. Relationships in the graph are represented by arrows; those arrows are recreated here in Cypher, literally sticking through the property names.

Find out why and how

The purpose of every database is to group related information together so that it stays together. Each query retrieves the rest of a group’s or record’s information when you provide it with part of that group’s information. A graph database is a subset of the database set. Not only does it store related data, but also Why it’s related — the relationships. So when you query the database, you will see all the related data along with their relationships. And because these relationships were produced as a graph to begin with, the retrieved relationships can be displayed as a graph just as easily.

There are three key relationships in this dataset: one representing a user asking a question, another representing a user receiving an answer to a question, and a third representing a user providing an answer to a question. The Cypher statement declares three variables q, you and a to represent the three node classes in this dataset. And from the results mode buttons to the left of the results area, you can choose to see the results as a traditional list, or even in JSON.

But what we really want here is a mapping of who asked what and who answered. It is through the visual projection of this data that we become fully informed. Imagine the table produced by an SQL query that asks q, you and a, all arranged in rows and columns. Now imagine the effort it would take to reconstruct the relationships between these three elements and convey those relationships in a single model. You can’t really do that without a chart.

Now you can invest in an add-on that reinterprets that product chart into a graphical format, maybe a bit like this chart. But if it’s the relationships you want from the start, you can choose to use a graph database from the start and save yourself the headache.

A graph database is not a relational database with a graph viewer tool mounted on it so it can spit out reports with circles and arrows that you paste into PowerPoints. Nor is it an add-on, attachment, or accessory to the database you currently have. Rather, it is a way to store relationships between data items, or knots, as well as the data. This way your query can focus on relationships and you can perform relationship-based calculations and analysis. A true graph database does both How? ‘Or’ What and Why things are related to each other.

The first modification you can try is to copy the Cypher query from the results pane to the database prompt and remove MATCH 10 from the end. Then, using the controls at the bottom right of the chart, zoom out to see the full chart for the full 300-entry dataset.

From where from here?

This is just a taste of the solid experience of using Neo4j with a comprehensive set of data and analysis tools. You can take the next step without investing a single penny. You can sign up for AuraDB Free, set up a database in our fully managed cloud service, and use the full Cypher language to build functions and analytics that you can embed into applications with the same languages ​​you currently use, including Python , Java and Node.js. .

Here are some of the options available to you now:

Band Created with Sketch.

Leave a Comment