Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Graph Data Processing with Cypher
Graph Data Processing with Cypher

Graph Data Processing with Cypher: A practical guide to building graph traversal queries using the Cypher syntax on Neo4j

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Graph Data Processing with Cypher

Introduction to Neo4j and Cypher

Neo4j is the world’s leading graph database. Its architecture is optimized to store, retrieve, and traverse graphs as nodes and relationships. It takes a property graph approach, which is beneficial for fast traversals and operations.

Neo4j uses Cypher as its query language, which makes it easy to represent traversals. Cypher is a declarative language for describing visual patterns in graphs using ASCII-art-like syntax. This makes it easy to read and comprehend how the data is connected as nodes and relationships in graphs.

In this chapter, we will cover the following topics:

  • Introducing Neo4j and graph database concepts
  • Installing the Neo4j Desktop
  • A visual tour of Neo4j Desktop
  • Using Neo4j Desktop
  • Working with local DBMSs

If you are already familiar with these basic concepts and are comfortable using Neo4j Desktop and Browser, you can skip this chapter and move on to the next ones.

Technical requirements

You need a Windows, Mac, or Linux machine to be able to download and install Neo4j Desktop. Neo4j Desktop comes pre-packaged with all the required software dependencies.

Introducing Neo4j and graph database concepts

In this section, we will take a look at how data is stored as a graph in Neo4j. We will first introduce what a graph is, what a graph consists of, and how we can query graphs.

Neo4j uses a property graph data model to store the data. The following diagram shows a sample graph created in Neo4j:

Figure 1.1 – Sample graph

Figure 1.1 – Sample graph

Neo4j property graphs can consist of the following features:

  • Nodes, which describe the entities of a domain.
  • Nodes can have zero or more labels, but a node with no labels is not a normal occurrence. A node with multiple labels represents multiple facets that the node is part of. For example, a node that has labels such as Employee and Manager means this node is an employee who is also a manager.
  • A relationship is a connection between two nodes.
  • Relationships always have a direction, which is represented using an arrow symbol. The node at the starting point of the arrow is called the start node and the node at the end is called the target node.
  • Relationships should have a type, which describes the relationship between the two nodes.
  • Both nodes and relationships can have properties, which are key-value pairs.

Let’s take a look at what nodes represent in a graph.

Understanding nodes in graphs

A node is used to represent an entity in the data domain. A sample node in an HR data domain might be as shown in the following figure:

Figure 1.2 – A node in a graph

Figure 1.2 – A node in a graph

This node represents a person in an HR data domain. It has two labels. A label can be thought of as something that describes what this node data represents. Here, the labels are Employee and Manager. This can be interpreted as the node representing an employee who is also a manager, with the firstName, lastName, and joinDate properties.

Let’s take a look at what relationships represent in a graph.

Understanding relationships in graphs

A relationship describes how a source node and a target node are related. It is possible for a node to have a relationship with itself.

A relationship has the following aspects:

  • It joins a source node and a target node, symbolizing the relationship between these nodes.
  • It has a direction, which can be either incoming or outgoing. It represents the relationship direction of the nodes it is connecting.
  • It has a type, which represents the nature of the connection between the nodes.
  • It can have properties (key-value pairs), which further describe the relationship.

The following diagram represents relationships between employee nodes in HR data:

Figure 1.3 – Relationships between employee nodes

Figure 1.3 – Relationships between employee nodes

Figure 1.3 represents an employee named John Doe who reports to a manager named Tom Riddle. The REPORTS_TO string is the type of relationship between the two nodes. The direction of the relationship shows the direction of reporting structure. A relationship can also have properties that can further quantify the type of relationship between the two nodes.

Cypher

Nodes typically represent entities, such as concepts, events, places, and so on. Relationships connect the nodes that represent the context of how those two nodes are related. They can be considered as building blocks of the graph. The real strength of a property graph lies in its simplicity when it comes to representing and traversing patterns in graphs in an efficient manner.

Cypher is a query language based on graph traversal descriptions. These patterns are used to match the desired graph paths. When the matching pattern has been found, it can be used for further processing.

A simple pattern in Cypher is shown as follows:

(p:Person {name: "Tom"})–[:LIVES_IN]->
       (city:City {name: "Edison"})–[:PART_OF]->
       (country:Country {name: "United States"} )

The pattern here is self-explanatory and human-readable. A person named Tom lives in a city named Edison, which is a part of the country named the United States. You can see here that nouns represent the nodes and verbs represent the relationships.

We will take a deeper look at Cypher syntax in the coming chapters.

Installing Neo4j Desktop

Neo4j Desktop is a client application that makes it easy for developers to quickly start working with Neo4j databases. This makes it easier to set up and play with Neo4j databases, along with becoming familiar with other tools for developers. Neo4j Desktop allows the user to create multiple servers as needed and work with them in a seamless manner. This makes it easier to update the configuration of DataBase Management Systems (DBMSs), manage plugins, view the logs, backup and restore data, and upgrade the existing DBMS instances.

Downloading Neo4j Desktop

Neo4j Desktop can be downloaded from the Neo4j website, https://neo4j.com/download/.

The system requirements to install the Neo4j desktop are shown in the following table:

Software requirements:

macOS

10.10 (Yosemite)

Ubuntu

12.04+

Fedora

21

Debian

8

Windows

8.1+, with PowerShell 5.1+

Figure 1.4 – System requirements for Neo4j Desktop

Neo4j comes bundled with Java 17, Java 11, and Java 8, along with Neo4j Browser and the Bloom visualization plugin.

Figure 1.5 – Neo4j Desktop download

Figure 1.5 – Neo4j Desktop download

Next, follow the steps to download Neo4j Desktop:

  1. Click on the Download Desktop button to register and download Neo4j Desktop. This will take you to the registration screen.
Figure 1.6 – User registration screen

Figure 1.6 – User registration screen

  1. Fill out the form with your details. You will need to register with an email to download. You will receive an activation key once registration is complete, as shown in the following figure. This activation key will also be emailed to the email address you have provided.
Figure 1.7 – Neo4j Desktop Activation Key

Figure 1.7 – Neo4j Desktop Activation Key

Now that we have downloaded the Neo4j Desktop binary and acquired the activation key, let us continue with installation.

The installation steps are as follows:

  1. Double-click on the downloaded file to start the installation.
Figure 1.8 – End user license agreement

Figure 1.8 – End user license agreement

  1. Accept the terms and conditions by clicking on the I Agree button. You are only asked to do this the first time Neo4j Desktop is installed.
Figure 1.9 – Selecting an installation location

Figure 1.9 – Selecting an installation location

  1. Select the installation location and click Confirm.
Figure 1.10 – Activating Desktop with a software key

Figure 1.10 – Activating Desktop with a software key

  1. Take the software key, paste it into the software key box, and click on Activate.
Figure 1.11 – Installation progress

Figure 1.11 – Installation progress

Neo4j Desktop will continue setting up a first-time environment and creates a starter database when installation is complete. Neo4j Desktop is now ready for use.

A visual tour of Neo4j Desktop

Let’s have a visual tour of the Neo4j Desktop. The following screenshot shows the screen after Neo4j Desktop has launched successfully. The arrows and text point to various sections of the Desktop UI. We will explore each of those sections shortly.

Figure 1.12 – Neo4j Desktop start screen

Figure 1.12 – Neo4j Desktop start screen

Let’s move on to the Projects menu next.

Projects menu

A project in Neo4j Desktop is a representation of a development folder. You can create local database instances, known as DBMSs, or connect to remote DBMSs, and add files within your project. This allows you to manage multiple projects, and it is easy to move databases and files between different projects using the drag and drop method. At any given point in time, you can have only one active local DBMS or remote connection.

DBMSs menu

A DBMS is a Neo4j server instance that contains a minimum of the system database and a default database. When a DBMS is created, a default database named Neo4j is made. This can be renamed, or a new database can be created.

This screenshot shows all the versions of Neo4j servers that are available to create instances using Neo4j Desktop, along with how many instances of each version exist.

Figure 1.13 – DBMSs menu

Figure 1.13 – DBMSs menu

Neo4j Desktop includes a free Neo4j Enterprise license for developers to explore all the enterprise capabilities, such as multiple databases, role-based access controls, and so on.

Graph applications

When you click on the graph applications icon in Neo4j Desktop, it will show a list of the graph applications installed.

The following figure shows the graph applications that are available in Neo4j Desktop:

Figure 1.14 – Graph applications

Figure 1.14 – Graph applications

Neo4j Desktop comes with the Neo4j Browser and Bloom applications pre-packaged to help you interact with graphs.

When you click on Graph Apps Gallery, it will take you to the site to explore and install other graph apps.

Help menu

When the help menu is clicked, Neo4j Desktop shows all the forms of help available, as shown in the following screenshot:

Figure 1.15 – Help menu

Figure 1.15 – Help menu

This section contains the links for Neo4j documentation and resources for developers.

Settings menu

When you click on the settings menu icon, Neo4j Desktop shows the menu that controls Neo4j Desktop operations. The following figure shows which aspects of Neo4j Desktop users can control and change.

Figure 1.16 – Application settings menu

Figure 1.16 – Application settings menu

Users can control whether to send crash reports and usage statistics to Neo4j. If Store DBMS passwords is checked, then the user ID and passwords are stored securely, so that you don’t need to enter them every time the Neo4j server is restarted.

In some enterprise environments, you might have to configure a proxy for Neo4j Desktop to be able to go to the internet to download updates and install graph apps and the latest Neo4j server software.

Now that we have talked about the UI control elements of Neo4j Desktop, the next section will discuss using these elements to create a Neo4j instance and manage it.

Using Neo4j Desktop

In this section, we will take a look at how we can use Neo4j Desktop to create a Neo4j instance and manage it.

Creating a local DBMS

Let’s go through the steps to create a local DBMS:

  1. To create a local DBMS, a project should be created and selected.
Figure 1.17 – Creating a local DBMS

Figure 1.17 – Creating a local DBMS

  1. Click on the Add button and select Local DBMS to create a local DBMS instance.
Figure 1.18 – Select the Neo4j version

Figure 1.18 – Select the Neo4j version

  1. You can change the name from Graph DBMS to anything that makes sense. You will need to provide a password. This would be the password for the Neo4j admin user.
  2. In the Version dropdown, Neo4j Desktop shows the latest downloaded version as the selected one and, if there are newer versions, they are also shown in the dropdown with a download icon next to them. This means this version is not available locally and needs to be downloaded. If you would like to use any of those versions, then click on the download icon. This will download that version of the Neo4j software before creating the local DBMS instance.
  3. Once the required version is selected, click the Create button to create the local instance.

Next, we will take a look at how we can manage the instance we have created.

Managing a local DBMS instance

Once we have created the local database instance, we can then manage that instance. We can start/stop the instance, change the configuration, and add plugins. Here, we will take a look at how to manage the local Neo4j instance we created.

Reviewing DBMS details

Once the instance is created, an entry is shown in the selected project. The following screenshot shows the instance details:

Figure 1.19 – Local instance details

Figure 1.19 – Local instance details

When you click on the name of the instance, it shows the details on the right-hand side. The description box can be used to add details about this DBMS instance. If you need to change the password, it can be done under the Reset DBMS password option.

Managing DBMS plugins

For this instance, we can add or remove plugins. To do this, click on the Plugins tab. It displays all the installed plugins and the available plugins to install. The following screenshot captures this aspect:

Figure 1.20 – Plugins installation

Figure 1.20 – Plugins installation

The list of the plugins available is dependent on the version of the Neo4j instance. When you click on the name of the plugin, it shows the details of that plugin and any related links. You can click on the Install button to install a plugin. Neo4j Desktop will install the plugin and make the required changes to the server configuration.

Upgrading the server

It is possible to upgrade the version of the instance we have created. When you click on the Upgrade tab, it shows the options available. The following screenshot captures this aspect:

Figure 1.21 – Upgrade options

Figure 1.21 – Upgrade options

Here, you will find a dropdown of all possible versions of this instance that can be upgraded. When a version is selected, the release notes for that version are shown. By clicking the Upgrade button, you can upgrade the selected DBMS instance.

Working with a local DBMS

This section discusses how you can work with a local Database Management System (DBMS) instance. We can perform multiple operations on an instance. We can start a stopped instance and once an instance is started, we can launch the browser and work with the database instance.

Starting the instance

When an instance is selected in a project, it will show the buttons to start the instance. The following screenshot showcases this:

Figure 1.22 – Starting the instance

Figure 1.22 – Starting the instance

Click on the Start button to start the instance.

Opening the browser

When the instance is available to query, the Open button will be activated. The following screenshot demonstrates this:

Figure 1.23 – Opening the browser

Figure 1.23 – Opening the browser

Click on the Open button to open the browser. If you need to create another database, you can use the Create Database button to create a new database on this instance. By default, a database named neo4j will be created.

Working with the browser’s UI

The browser looks as shown in the following screenshot. It can be used to query the database.

Figure 1.24 – Neo4j Browser

Figure 1.24 – Neo4j Browser

The Neo4j Browser interface is used to execute Cypher queries against a database:

  1. On the left side of the Neo4j Browser interface, you can see the database details. The dropdown shows the active database that is selected. It can be changed by clicking on the dropdown and selecting the required database.
  2. Below the dropdown, you can see the number of nodes, node labels, relationships, relationship types, and property types. You can click on the name of the node labels or relationship types to sample data.
  3. Below the database stats section, there are the current user details and user management shortcuts to create, update, or delete local users. It also gives a shortcut to disconnect from DBMS.
  4. The DBMS section shows the current DBMS version and shortcut links to get the DBMS details, such as a list of databases available, current queries being executed, and system information.

The query area is where Cypher queries are written. Click on the blue arrow to execute the query. The results will be shown below the query area.

Using Browser help

To get help with browser usage, you can enter :help in the query area. Neo4j Browser will show all the commands available with descriptions, as shown by the following figure:

Figure 1.25 – Browser help

Figure 1.25 – Browser help

If you scroll down, you will see links for various guides for sample graphs to play with. When you click on the link, you get a guided tour of content that the user can follow by clicking along the way. Here are some sample graph concepts and Cypher guides to illustrate how it works:

Figure 1.26 – Graph concepts

Figure 1.26 – Graph concepts

The graph concepts guide provides basic concepts for the user to review before working with Cypher. For new graph database users, this would be a very valuable guide to follow to review the basic concepts.

Figure 1.27 – Cypher help

Figure 1.27 – Cypher help

The Cypher help guide introduces keywords and the basic usage of building queries using these keywords. For new users, this provides a good introduction to Cypher in a quick and clean fashion.

Next, we will take a look at the administrative aspect of the local instance.

Working with additional options to manage local DBMS

We will take a look at administrative and filesystem aspects in this section. When you click on the icon, it shows a drop-down menu displaying the additional options available, as shown in the following screenshot:

Figure 1.28 – Additional options to manage an instance

Figure 1.28 – Additional options to manage an instance

As you can see, it provides options to manage the settings, see the logs, look at the folder system where the instance is available, see the terminal, and so on.

Managing settings

When you click on Settings, it brings up the settings UI to view and modify the settings for this instance.

Figure 1.29 – Neo4j instance settings

Figure 1.29 – Neo4j instance settings

When you modify the settings, the Apply button at the bottom will become activated and an Undo button will appear. When you click the Apply button, it will update the server configuration and restart the instance so that these configurations are applied. The Undo button will undo only the latest changes made. When you click on Reset to defaults, it will reset all the configuration values to the original defaults and restart the server.

Viewing logs

When you click on Logs, you will be faced with the system log window, as shown in the following screenshot:

Figure 1.30 – Instance log

Figure 1.30 – Instance log

There are four different logs are provided by Neo4j, and they are as follows:

  1. By default, you get neo4j.log. This is the basic system log. You can click on the filenames at the top to see debug.log, query.log, or security.log.
  2. debug.log contains detailed information to help you troubleshoot the server.
  3. query.log contains the queries issued against the server.
  4. security.log contains the authentication-related logging details.
  5. When you click on Reveal logs in Finder, it opens up the finder window or file explorer window, so that you can use other text or log reader utilities to read the files.

Opening the Neo4j Desktop terminal

When you click Terminal menu item, you get a terminal or command-line window with the directory changed to the location of the DBMS instance.

Figure 1.31 – Local DBMS instance terminal window

Figure 1.31 – Local DBMS instance terminal window

You can do almost all the things that we’ve been using the UI to do in the terminal. You can edit a configuration, see logs, and start/stop an instance.

Opening the folder

When you click on Open Folder menu item, you’ll see a submenu:

Figure 1.32 – Local DBMS instance file explorer

Figure 1.32 – Local DBMS instance file explorer

Depending on which submenu is selected, you will get a finder or file explorer navigated to the root of the installation directory or any of the other sub-directories that are selected. The following screenshot shows the root directory file window:

Figure 1.33 – Local DBMS instance root directory

Figure 1.33 – Local DBMS instance root directory

When you select any of the sub-menu items, such as import, plugins ,logs, or configuration, it will navigate directly to the import, logs, plugins, or conf directory.

Summary

In this chapter, we have covered the process of downloading and installing Neo4j Desktop. We have explored how to activate it by registering with Neo4j, explored the UI in detail, and learned how to create projects and local databases, as well as how to manage a database by changing the configuration or adding/removing plugins. We also explored how to use Neo4j Browser self-help guides to review graph database concepts or to learn Cypher. Finally, we looked at database configuration and log exploration using the command line or file explorer.

We connected to a local instance using Neo4j Browser to start writing queries. With this setup, we should be able to start building Cypher queries to talk to a Neo4j database.

If you would like to learn more about Neo4j Desktop, Neo4j Browser, or available plugins, you can go to http://neo4j.com/docs to find more details.

In the next chapter, we will take a detailed look at Cypher fundamentals and keywords to understand how we can use Cypher to work with the instances we create.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Work with Cypher syntax and semantics while building graph traversal queries
  • Get up and running with advanced Cypher concepts like List, Maps, OPTIONAL MATCH
  • Master best practices in writing effective queries leveraging data modeling and patterns

Description

While it is easy to learn and understand the Cypher declarative language for querying graph databases, it can be very difficult to master it. As graph databases are becoming more mainstream, there is a dearth of content and guidance for developers to leverage database capabilities fully. This book fills the information gap by describing graph traversal patterns in a simple and readable way. This book provides a guided tour of Cypher from understanding the syntax, building a graph data model, and loading the data into graphs to building queries and profiling the queries for best performance. It introduces APOC utilities that can augment Cypher queries to build complex queries. You’ll also be introduced to visualization tools such as Bloom to get the most out of the graph when presenting the results to the end users. After having worked through this book, you’ll have become a seasoned Cypher query developer with a good understanding of the query language and how to use it for the best performance.

Who is this book for?

This book is targeted at Database Administrator, Database Developers, Graph Database Developers, and Graph Database Architects. This book will also help someone migrate from a DBA role to a graph data engineer or data scientist If you are working with graph databases and need to learn Cypher, or are a basic Cypher developer who wants to get better at data modeling and tuning queries to build performant Cypher queries, then this is the book for you.

What you will learn

  • Write Cypher queries from basic to advanced level
  • Map the source data to the graph data model in an iterative fashion
  • Load the data into a graph using LOAD CSV, APOC, and client drivers
  • Map the business questions to graph queries effectively
  • Identify query performance issues and fix them
  • Extend capabilities of Cypher using APOC utilities
  • Work with graph visualization tools like Bloom and Browser
Estimated delivery fee Deliver to Czechia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 16, 2022
Length: 332 pages
Edition : 1st
Language : English
ISBN-13 : 9781804611074
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Czechia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Dec 16, 2022
Length: 332 pages
Edition : 1st
Language : English
ISBN-13 : 9781804611074
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 109.97
Graph Data Processing with Cypher
€29.99
Graph Machine Learning
€39.99
Modern Time Series Forecasting with Python
€39.99
Total 109.97 Stars icon
Banner background image

Table of Contents

17 Chapters
Part 1: Cypher Introduction Chevron down icon Chevron up icon
Chapter 1: Introduction to Neo4j and Cypher Chevron down icon Chevron up icon
Chapter 2: Components of Cypher Chevron down icon Chevron up icon
Part 2: Working with Cypher Chevron down icon Chevron up icon
Chapter 3: Loading Data with Cypher Chevron down icon Chevron up icon
Chapter 4: Querying Graph Chevron down icon Chevron up icon
Chapter 5: Filtering, Sorting, and Aggregations Chevron down icon Chevron up icon
Chapter 6: List Expressions, UNION, and Subqueries Chevron down icon Chevron up icon
Part 3: Advanced Cypher Concepts Chevron down icon Chevron up icon
Chapter 7: Working with Lists and Maps Chevron down icon Chevron up icon
Chapter 8: Advanced Query Patterns Chevron down icon Chevron up icon
Chapter 9: Query Tuning Chevron down icon Chevron up icon
Chapter 10: Using APOC Utilities Chevron down icon Chevron up icon
Chapter 11: Cypher Ecosystem Chevron down icon Chevron up icon
Chapter 12: Tips and Tricks Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(10 Ratings)
5 star 80%
4 star 10%
3 star 10%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Kent Stroker Jan 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ravi presents Cypher for graph queries in an easy-to-digest format. The examples presented are well thought out and show that the author understands the topic. If you are just starting to work with Neo4j or are a veteran, this book should be on your shelf.
Amazon Verified review Amazon
Billy Jan 12, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The information that Ravi has compiled is based on his own experience developing graph solutions as well as reviewing and guiding the solutions developed within the community. Having a deep understanding of graph traversals and how a graph database product like Neo4j has been implemented can help a developer new to graph solution design and implementation bridge the gap from getting their hands dirty with cypher, to actually implementing real, product quality, scalable graph solutions.
Amazon Verified review Amazon
Ashwin Jan 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been working with Cypher and Neo4j for the past seven years since 2015 and have had the pleasure of knowing and working with Ravi Anthapu on a few projects. In these years what I have realized is that learning to write cypher queries is easy, but learning to write highly performant cypher queries is an art. Anyone can swing a bat and sometimes hit the base-ball, but to become an MVP baseball player one needs to hone their batting skills under the right trainer. Ravi's Graph data processing with Cypher is not just a book on learning how to write cypher, but how one can hone their skills in writing highly performant cypher.There are quite a few books that talk about cypher and how to write cypher. However few deal with the inner complexities of how the query gets executed, what should be done to optimize the query and how one should think differently when it comes to a graph as opposed to a regular Relational database. In the chapter on Filtering, Sorting and aggregations, the author shows how adding labels actually penalizes the query because of the differences in how Graph traversal works as opposed to a regular sql database where adding an index (the equivalent to a label) usually improves the performance. However in Graph traversal he demonstrates with examples on how the number of db hits increase when adding labels to nodes in the query match pattern. In a chapter 9 he specifically focuses on using the Explain and profile parameters to tune the query. He also provides examples on how to use Index hints to tune the performance of the query.Of course the best part of this book apart from writing cypher which he has done a great job, he also illustrates the use of apoc utilities and the path expander routine which is one of the most useful apoc routines to explore the neighborhoods of a node by allowing traversals on select paths.Overall the book is very practical and great not just for the person who is beginning to learn cypher, but also for people who are looking to improve the performance of the cypher queries they have written by following some of the techniques illustrated in this book.
Amazon Verified review Amazon
D. Hoy Dec 22, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I had the pleasure of working with Ravi on a large, multi-year corporate project. Ravi was our SME (Subject Matter Expert) for all aspects of Neo4j from database design, to Cypher query tuning, to configuring a large cluster of servers.In this book Ravi does a great job of sharing his wealth of experience and teaching the reader the concepts of working with a graph database. I highly recommend this for anyone considering working with Neo4j or who has dabbled with Cypher and wants to take their skills to the next level.
Amazon Verified review Amazon
David F. Jan 31, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a must-have for anyone starting out with Neo4j and the Cypher query language as well as anyone who wants to master some of the more complex concepts. Ravi's expertise and experience shine throughout the book as he presents the material in an easy-to-understand format. The real-world examples are invaluable to help show the concepts in action.The advanced section goes into more details on the internals of Neo4j. This section helps users understand how Neo4j works and how to tune the database.This book is a practical guide on writing Cypher and will be a valuable resource for years to come.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela