𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

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

✍ Scribed by Ravindranatha Anthapu


Publisher
Packt Publishing
Year
2022
Tongue
English
Leaves
332
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Get acquainted with Cypher in a guided manner quickly and learn how to query the graph databases with efficient and performant queries

Key Features

  • 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

Book 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.

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

Who this book is 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.

Table of Contents

  1. Introduction to Neo4j and Cypher
  2. Components of Cypher
  3. Loading Data with Cypher
  4. Querying Graph
  5. Filtering, Sorting, and Aggregations
  6. List Expressions, UNION, and Subqueries
  7. Working with Lists and Maps
  8. Advanced Query Patterns
  9. Query Tuning
  10. Using APOC Utilities
  11. Cypher Ecosystem
  12. Tips and Tricks

✦ Table of Contents


Cover
Title Page
Copyright and credit
Contributors
Table of Contents
Preface
Part 1: Cypher Introduction
Chapter 1: Introduction to Neo4j and Cypher
Technical requirements
Introducing Neo4j and graph database concepts
Understanding nodes in graphs
Understanding relationships in graphs
Cypher
Installing Neo4j Desktop
Downloading Neo4j Desktop
A visual tour of Neo4j Desktop
Projects menu
DBMSs menu
Graph applications
Help menu
Settings menu
Using Neo4j Desktop
Creating a local DBMS
Managing a local DBMS instance
Working with a local DBMS
Starting the instance
Opening the browser
Working with the browser’s UI
Working with additional options to manage local DBMS
Summary
Chapter 2: Components of Cypher
Technical requirements
Graph storage in Neo4j
Using the Cypher syntax
Property types
Structural types
Composite types
Using the nodes syntax
Using the relationships syntax
Working with Cypher keywords
Using MATCH and OPTIONAL MATCH
Using CREATE and DELETE
SET and REMOVE
Using WHERE, SKIP, LIMIT, and ORDER BY
Using MERGE
Using FOREACH
Using UNWIND
Using UNION and UNION ALL
Using indexes and constraints
Summary
Part 2: Working with Cypher
Chapter 3: Loading Data with Cypher
Before loading the data
Graph data modeling
Loading data with LOAD CSV
LOAD CSV without headers
LOAD CSV with headers
Loading data with LOAD CSV using batching
USING PERIODIC COMMIT
CALL IN TRANSACTIONS
Loading data using client drivers
URI schemes
Neo4j sessions
Mapping the source data to graph
Loading the patient data
Loading the encounter data
Loading provider data
Loading organization data
Loading medication data
Loading condition, procedure, and allergy data
Loading care plan data
Using client drivers
Summary
Chapter 4: Querying Graph
Exploring the data in Graph
Querying the nodes
Querying the paths
Summary
Chapter 5: Filtering, Sorting, and Aggregations
Filtering with node labels and relationship types
Filtering with WHERE and WITH clauses
Sorting data using the ORDER BY clause
Working with aggregations
Summary
Chapter 6: List Expressions, UNION, and Subqueries
Working with list expressions
Working with the range function
Working with the head function
Working with the tail function
Working with the last function
Working with the size function
Working with the reverse function
Working with the reduce function
Working with list comprehensions
Working with UNION in Cypher
Working with subqueries
Working with returning subqueries
Working with unit subqueries
Summary
Part 3: Advanced Cypher Concepts
Chapter 7: Working with Lists and Maps
Working with lists
Working with basic list capabilities
Working with list operators
Revisiting the list functions
Working with COLLECT and UNWIND
Working with maps
Working with map projections
Combining lists and maps
Summary
Chapter 8: Advanced Query Patterns
Working with the WITH clause
Introducing variables at the start
Working with the CASE clause
Working with simple CASE expressions
Working with generic CASE expressions
Working with the FOREACH clause
Working with the UNWIND clause
Working with count stores
Summary
Chapter 9: Query Tuning
Working with EXPLAIN
Working with PROFILE
Reviewing plan operators
Using index hints
Summary
Chapter 10: Using APOC Utilities
Installing APOC
Working with data import and export
Importing CSV data
Importing JSON data
Viewing database schema
Executing dynamic Cypher
Working with advanced path finding
Connecting to other databases
Using other useful methods
Summary
Chapter 11: Cypher Ecosystem
Using Neo4j extensions
Using visualization tools
Using Kafka and Spark connectors
Using Graph Data Science
Using Neo4j Workspace
Summary
Chapter 12: Tips and Tricks
Understanding the internals of Neo4j
Understanding the node store
Understanding the relationship store
Understanding the property store
Understanding Neo4j memory usage
Reviewing querying patterns
Troubleshooting a few common issues
Reviewing the new 5.0 changes
Summary
Index
Other Books You May Enjoy


πŸ“œ SIMILAR VOLUMES


Graph Data Processing with Cypher
✍ Ravindranatha Anthapu πŸ“‚ Library πŸ“… 2022 πŸ› Packt Publishing Pvt. Ltd. 🌐 Estonian

A practical guide to building graph traversal queries using the Cypher syntax on Neo4j

Graph Data Science with Python and Neo4j
✍ Timothy Eastridge πŸ“‚ Library πŸ“… 2024 πŸ› Orange Education Pvt Ltd, AVAβ„’ 🌐 English

Graph Data Science with Python and Neo4j is your ultimate guide to unleashing the potential of graph data science by blending Python's robust capabilities with Neo4j's innovative graph database technology. From fundamental concepts to advanced analytics and machine learning techniques, you'll learn

Learning Neo4j: Run blazingly fast queri
✍ Rik Van Bruggen πŸ“‚ Library πŸ“… 2014 πŸ› Packt Publishing 🌐 English

Learning Neo4j provides you with a step-by-step approach of adopting Neo4j, the world's leading graph database. This book includes a lot of background information, helps you grasp the fundamental concepts behind this radical new way of dealing with connected data, and will give you lots of examples

Learning Cypher: Write powerful and effi
✍ Onofrio Panzarino πŸ“‚ Library πŸ“… 2014 πŸ› Packt Publishing 🌐 English

Neo4j is generating much interest among NoSQL database users for its features, performance and scalability, and robustness. The software also provides users with a very natural and expressive graph model and ACID transactions with rollbacks. However, utilizing Neo4j in a real-world project can be di

Graph Data Science with Neo4j: Learn how
✍ Estelle Scifo πŸ“‚ Library πŸ› Packt Publishing 🌐 English

<p><span>Supercharge your data with the limitless potential of Neo4j 5, the premier graph database for cutting-edge machine learning</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Extract meaningful in

Graph Data Science with Neo4j: Learn how
✍ Estelle Scifo πŸ“‚ Library πŸ“… 2023 πŸ› Packt Publishing 🌐 English

Supercharge your data with the limitless potential of Neo4j 5, the premier graph database for cutting-edge machine learning Key Features: β€’ Extract meaningful information from graph data with Neo4j's latest version 5 β€’ Use Graph Algorithms into a regular Machine Learning pipeline in Python β€’ L