O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data modeling with Neo4j – moving away from traditional SQL

Data modeling using SQL is very different from the usual data modeling we do using Neo4j. The nearest mapping of SQL using the Neo4j graph database will be as follows:

SQL

Neo4j

The primary elements of any table, such as person, product, and so on

Node

Two different tables joined via a foreign key

Relationship

Tuple or row

Properties or attributes

Relational databases have a very rich model to store/express data, but it comes at a cost. To express relationships, the user has to use joins, which have their own cost. The more the number of relationships to be expressed, the more the number of joins over the table. This phenomenon has a serious impact on performance. Thus, in spite ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required