Learning Neo4j 3.x - Second Edition

Author: Jerome Baton   Rik Van Bruggen  

Publisher: Packt Publishing‎

Publication year: 2017

E-ISBN: 9781786460080

P-ISBN(Paperback): 9781786466143

Subject: TP39 computer application

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Chapter

Chapter 1: Graph Theory and Databases

Introducing Neo4j 3.x and a history of graphs

Definition and usage of the graph theory

Social studies

Biological studies

Computer science

Flow problems

Route problems

Web search

Background

Navigational databases

Relational databases

NoSQL databases

Key-value stores

Column-family stores

Document stores

Graph databases

The Property Graph model of graph databases

Node labels

Relationship types

Why use graph databases, or not

Why use a graph database?

Complex queries

In-the-clickstream queries on live data

Pathfinding queries

When not to use a graph database and what to use instead

Large set-oriented queries

Graph global operations

Simple aggregate-oriented queries

Test questions

Summary

Chapter 2: Getting Started with Neo4j

Key concepts and characteristics of Neo4j

Built for graphs from the ground up

Transactional ACID-compliant database

Made for online transaction processing

Designed for scalability

A declarative query language - Cypher

Sweet spot use cases of Neo4j

Complex join-intensive queries

Pathfinding queries

Committed to open source

The features

The support

The license conditions

Installing Neo4j

Installing Neo4j on Windows

Installing Neo4j on Mac or Linux

Using Neo4j in a cloud environment

Sandbox

Using Neo4j in a Docker container

Installing Docker

Preparing the filesystem

Running Neo4j in a Docker container

Test questions

Summary

Chapter 3: Modeling Data for Neo4j

The four fundamental data constructs

How to start modeling for graph databases

What we know – ER diagrams and relational schemas

Introducing complexity through join tables

A graph model – a simple, high-fidelity model of reality

Graph modeling – best practices and pitfalls

Graph modeling best practices

Designing for query-ability

Aligning relationships with use cases

Looking for n-ary relationships

Granulate nodes

Using in-graph indexes when appropriate

Graph database modeling pitfalls

Using rich properties

Node representing multiple concepts

Unconnected graphs

The dense node pattern

Test questions

Summary

Chapter 4: Getting Started with Cypher

Writing the Cypher syntax

Key attributes of Cypher

Being crude with the data

Create data

Read data

Update data

Delete data

Key operative words in Cypher

Syntax norms

More that you need to know

With a little help from my friends

The Cypher refcard

The openCypher project

Summary

Chapter 5: Awesome Procedures on Cypher - APOC

Installing APOC

On a hardware server

On a Docker container

Verifying APOC installation

Functions and procedures

My preferred usages 

A little help from a friend

Graph overview

Several key usages

Setup

Random graph generators

PageRank

Timeboxed execution of Cypher statements

Linking of a collection of nodes

There's more in APOC

Test questions

Summary

Chapter 6: Extending Cypher

Building an extension project

Creating a function

Creating a procedure

Custom aggregators

Unmanaged extensions

HTTP and JAX-RS refreshers

Registering

Accessing

Streaming JSON responses

Summary

Chapter 7: Query Performance Tuning

Explain and profile instructions

A query plan

Operators

Indexes

Force index usage

Force label usage

Rules of thumb

Explain all the queries

Rows

Do not overconsume

Cartesian or not?

Simplicity

Summary

Chapter 8: Importing Data into Neo4j

LOAD CSV

Scaling the import

Importing from a JSON source

Importing from a JDBC source

Test setup

Importing all the systems

Importing from an XML source 

Summary

Chapter 9: Going Spatial

What is spatial?

Refresher

Not faulty towers

What is so spatial then?

Neo4j's spatial features 

APOC  spatial features

Geocoding

Setting up OSM as provider

Setting up Google as provider

Neo4j spatial

Online demo

Features

Importing OpenStreetMap data

Large OSM Imports

Easy way

The tougher way to import data 

Restroom please

Understanding WKT and  BBOX

Removing all the geo data

Summary

Chapter 10: Security

Authentication and authorization

Roles

Other roles

Users management

Linking Neo4j to an LDAP directory

Starting the directory 

Configuring Neo4j to use LDAP

Test questions

Summary

Chapter 11: Visualizations for Neo4j

The power of graph visualizations

Why graph visualizations matter!

Interacting with data visually

Looking for patterns

Spot what's important

The basic principles of graph visualization

Open source visualization libraries

D3.js

GraphViz

Sigma.js

Vivagraph.js

yWorks

Integrating visualization libraries in your application

Visualization solutions

Gephi

Keylines

Keylines graph visualization

Linkurio.us

Neo4j Browser

Tom Sawyer Software for graph visualization

Closing remarks on visualizations - pitfalls and issues

The fireworks effect

The loading effect

Cytoscape example

Source code

Questions and answers

Summary

Chapter 12: Data Refactoring with Neo4j

Preliminary step

Simple changes

Renaming

Adding data

Adding data with a default value

Adding data with specific values

Checking our values

Removing data

Great changes

Know your model

Refactoring tools

Property to label

Property to node

Related node to label

Merging nodes 

Relations

Consequences

Summary

Chapter 13: Clustering

Why set up a cluster?

Concepts

Core servers

Read replica servers

High throughput

Data redundancy

High availability

Bolt

Building a cluster

The core servers

The read replicas

The bolt+routing protocol

Disaster recovery

Summary

Chapter 14: Use Case Example - Recommendations

Recommender systems dissected

Using a graph model for recommendations

Specific query examples for recommendations

Recommendations based on product purchases

Recommendations based on brand loyalty

Recommendations based on social ties

Bringing it all together - compound recommendations

Business variations on recommendations

Fraud detection systems

Access control systems

Social networking systems

Questions and answers

Summary

Chapter 15: Use Case Example - Impact Analysis and Simulation

Impact analysis systems dissected

Impact analysis in business process management

Modeling your business as a graph

Which applications are used in which buildings?

Which buildings are affected if something happens to Appl_9?

What business processes with an RTO of 0-2 hours would be affected by a fire at location Loc_100?

Impact simulation in a cost calculation environment

Modeling your product hierarchy as a graph

Working with a product hierarchy graph

Calculating the price based on a full sweep of the tree

Calculating the price based on intermediate pricing

Impact simulation on product hierarchy

Questions and answers

Summary

Appendix: Tips and Tricks

Reset password

Check for other hosts

Getting the first line of a CSV file

Enabling SSH on a Raspberry Pi

Creating guides for the Neo4j browser

Data backup and restore

Community version

Enterprise version

Tools

Cypher-shell

Data integration tools

Modeling tools

Arrows

OmniGraffle

Community projects

Online documentation

Community

More proverbs

Index

The users who browse this book also browse


No browse record.