SlideShare a Scribd company logo
opencypher.org | opencypher@googlegroups.comopencypher.org | opencypher@googlegroups.com
Multiple Graph Processing
Naming and Addressing
Alastair Green
Neo Technology Cypher Language Group
opencypher.org | opencypher@googlegroups.com
Problem #1 Loading and saving
> 1 Store → > 1 persistent graph
Local File
System
BOLT
opencypher.org | opencypher@googlegroups.com
Problem #1 Loading and saving
Neo4j instance
= 1 graph
Local File
System
BOLT GraphX/Frame
conventional
V+E files = 1
graph
Neo4j CSV
fileset = 1 graph
.graphml = 1
graph
.nq = n graphs
opencypher.org | opencypher@googlegroups.com
Containers and storage (rep + encoding) standards
Storage type Container type URI scheme Storage Format PG?
Neo4j Neo4j Server bolt:// Opaque Y
CSV fileset LFS, HDFS ... file://, hdfs:// Under-specified Y
.graphml LFS, HDFS ... file://, hdfs:// Well-specified N
GraphX/Frames
V+E files
HDFS, LFS, ... file://, hdfs:// Under-specified N
N-Quads LFS, HDFS, ... file://, hdfs:// Well-specified N
...
opencypher.org | opencypher@googlegroups.com
URI [+ directory/file convention] [+ PG convention]
How do we know where to find edges and vertices?
file:///path/to/the/data/devices/edges/*.csv | .txt
file:///path/to/the/data/devices/vertices/*.csv
How do we know where to find labels/types in *.csv?
What happens if we want to model graph properties?
■ These questions have to be answered by (small) specifications
■ Conventional/assumed answers may not be systematic or complete
opencypher.org | opencypher@googlegroups.com
graph:// URIs
A URI scheme that can
■ incorporate other URI schemes
■ register/refer to sub-specifications or URI scheme extensions that define
PG conventions
■ allow the hierarchical path convention used by many URI schemes to be
used to locate/identify containers or “spaces”
■ allows every path to terminate with the unqualfied name of a graph
graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’
The meaning/depth of the path is implementation determined
It might imply folders, partitions or instances or tenants … or nothing
opencypher.org | opencypher@googlegroups.com
Loading and saving graphs in Cypher queries*
IN GRAPH
EuropeSocialNetwork
AT
graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’
MATCH
(p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1)
CREATE
(t:FriendsTriangle),
(t)-[:contains]->(p1),
(t)-[:contains]->(p2),
(t)-[:contains]->(p3)
IN GRAPH
FriendsTriangles
AT
graph://graphml+pg/’hdfs://my-big-data/europe/snapshots/2017-08-23/friendsTriangles’
* Example use case and pattern concepts from LDBC QL TF input by Hannes Voigt
Load
Save
opencypher.org | opencypher@googlegroups.com
Or perhaps … or as well
GRAPH [europe]
AT
graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’
IN GRAPH
europe
MATCH
(p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1)
DEFAULT GRAPH AT
graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’
MATCH
(p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1)
Implicit?
Anonymous
Explicit
opencypher.org | opencypher@googlegroups.com
Problem #2 Graphs in the scope of queries
Cypher queries are made up of parts
■ Intermediate results are chained from part to part
■ We will want to allow those results to be graphs
■ There could be more than one, so names are needed
■ And it might be good to allow intermediate graphs to be persisted
WITH or IN?
A named graph could have global scope in the query (cf. current Cypher anon graph)
This would mean it could always be referred to in a later part
And also used in RETURN as a final result
opencypher.org | opencypher@googlegroups.com
Problem #3 Graphs in the scope of sub-queries
A sub-query must be able to return a graph
IN
{IN GRAPH someGraph MATCH CREATE ... AS GRAPH} // anonymous
MATCH
...
and it might be useful to name it (and perhaps persist it) for later reference
DECLARE DEFAULT GRAPH AT
graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’
IN
{MATCH ... CREATE ... AS GRAPH g [AT <url>]} // named [optionally saved]
MATCH
...
opencypher.org | opencypher@googlegroups.com
Problem #4 Queries returning graphs
Persisting a graph is not the same as returning a graph to a caller
■ Critical to allowing graph queries to be part of function chains
■ May be more than one graph that results from a query
■ If so then each graph needs a name
CREATE
(t:FriendsTriangle), (t)-[:contains]->(p1),
(t)-[:contains]->(p2),(t)-[:contains]->(p3)
IN GRAPH
FriendsTriangles
RETURN
FriendsTriangles
opencypher.org | opencypher@googlegroups.com
Problem #5 Views
Logically we compose queries as functions over views q(v(G))
IN GRAPH
EuropeSocialNetwork
MATCH
(p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1)
CREATE
(t:FriendsTriangle), (t)-[:contains]->(p1),
(t)-[:contains]->(p2), (t)-[:contains]->(p3)
IN GRAPH
FriendsTriangles AS VIEW
IN GRAPH
FriendsTriangles
MATCH
...

More Related Content

PPTX
PPTX
Introduction to HDF5 Data and Programming Models
PPT
Using HDF5 and Python: The H5py module
DOC
Filelist
PPSX
NASA HDF/HDF-EOS Data for Dummies (and Developers)
PPTX
Tools to improve the usability of NASA HDF Data
PPTX
Intro of C
Introduction to HDF5 Data and Programming Models
Using HDF5 and Python: The H5py module
Filelist
NASA HDF/HDF-EOS Data for Dummies (and Developers)
Tools to improve the usability of NASA HDF Data
Intro of C

What's hot (20)

PPT
Substituting HDF5 tools with Python/H5py scripts
PPTX
Interoperability with netCDF-4 - Experience with NPP and HDF-EOS5 products
PPTX
HDF Group Support for NPP/NPOESS/JPSS
PDF
The State of Go - Andrew Gerrand
PDF
Compiler Construction | Lecture 15 | Memory Management
PPSX
NASA HDF/HDF-EOS Data Access Challenges
PPTX
carrow - Go bindings to Apache Arrow via C++-API
PDF
How it's made: C++ compilers (GCC)
PDF
Go. why it goes v2
PDF
[GSoC 2017] gopy: Updating gopy to support Python3 and PyPy
PDF
Pivot tables mysql_5
ODP
C Under Linux
PPT
History of c++
PPT
History of c++
PDF
Introduction to cython: example of GCoptimization
PDF
OrientDB and Hazelcast
PPTX
Padding oracle [opkoko2011]
ODP
Open Source .NET
PPT
06 Justenough Information
Substituting HDF5 tools with Python/H5py scripts
Interoperability with netCDF-4 - Experience with NPP and HDF-EOS5 products
HDF Group Support for NPP/NPOESS/JPSS
The State of Go - Andrew Gerrand
Compiler Construction | Lecture 15 | Memory Management
NASA HDF/HDF-EOS Data Access Challenges
carrow - Go bindings to Apache Arrow via C++-API
How it's made: C++ compilers (GCC)
Go. why it goes v2
[GSoC 2017] gopy: Updating gopy to support Python3 and PyPy
Pivot tables mysql_5
C Under Linux
History of c++
History of c++
Introduction to cython: example of GCoptimization
OrientDB and Hazelcast
Padding oracle [opkoko2011]
Open Source .NET
06 Justenough Information
Ad

Similar to openCypher: Naming and Addressing Multiple Graphs (20)

PDF
Intro to Cypher
PDF
Multiple Graphs: Updatable Views
PPTX
Mapping Graph Queries to PostgreSQL
PPTX
The openCypher Project - An Open Graph Query Language
PDF
The 2nd graph database in sv meetup
PDF
Cypher and apache spark multiple graphs and more in open cypher
PDF
Multiple graphs in openCypher
PDF
AgensGraph Presentation at PGConf.us 2017
PPTX
GraphDatabase.pptx
PDF
AgensGraph: a Multi-model Graph Database based on PostgreSql
PDF
Leveraging the Power of Graph Databases in PHP
PDF
Neo4j Introduction (Basics, Cypher, RDBMS to GRAPH)
PPTX
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
PDF
Shutl
PPTX
Graph Database Query Languages
PDF
Document Oriented Access to Graphs
PDF
03 introduction to graph databases
PDF
Morpheus SQL and Cypher® in Apache® Spark - Big Data Meetup Munich
PDF
Morpheus - SQL and Cypher in Apache Spark
Intro to Cypher
Multiple Graphs: Updatable Views
Mapping Graph Queries to PostgreSQL
The openCypher Project - An Open Graph Query Language
The 2nd graph database in sv meetup
Cypher and apache spark multiple graphs and more in open cypher
Multiple graphs in openCypher
AgensGraph Presentation at PGConf.us 2017
GraphDatabase.pptx
AgensGraph: a Multi-model Graph Database based on PostgreSql
Leveraging the Power of Graph Databases in PHP
Neo4j Introduction (Basics, Cypher, RDBMS to GRAPH)
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
Shutl
Graph Database Query Languages
Document Oriented Access to Graphs
03 introduction to graph databases
Morpheus SQL and Cypher® in Apache® Spark - Big Data Meetup Munich
Morpheus - SQL and Cypher in Apache Spark
Ad

More from openCypher (20)

PDF
Learning Timed Automata with Cypher
PDF
Incremental View Maintenance for openCypher Queries
PDF
Formal semantics for Cypher queries and updates
PDF
Cypher.PL: an executable specification of Cypher semantics
PDF
Micro-Servicing Linked Data
PDF
Graph abstraction
PDF
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
PDF
Cypher for Gremlin
PDF
Comparing PGQL, G-Core and Cypher
PDF
Eighth openCypher Implementers Group Meeting: Status Update
PDF
Cypher for Gremlin
PDF
Supporting dates and times in Cypher
PDF
Seventh openCypher Implementers Group Meeting: Status Update
PDF
Academic research on graph processing: connecting recent findings to industri...
PDF
Property Graphs with Time
PDF
Cypher.PL: Executable Specification of Cypher written in Prolog
PDF
Use case: processing multiple graphs
PDF
openCypher Technology Compatibility Kit (TCK)
PDF
Cypher Editor in the Web
PDF
The inGraph project and incremental evaluation of Cypher queries
Learning Timed Automata with Cypher
Incremental View Maintenance for openCypher Queries
Formal semantics for Cypher queries and updates
Cypher.PL: an executable specification of Cypher semantics
Micro-Servicing Linked Data
Graph abstraction
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
Cypher for Gremlin
Comparing PGQL, G-Core and Cypher
Eighth openCypher Implementers Group Meeting: Status Update
Cypher for Gremlin
Supporting dates and times in Cypher
Seventh openCypher Implementers Group Meeting: Status Update
Academic research on graph processing: connecting recent findings to industri...
Property Graphs with Time
Cypher.PL: Executable Specification of Cypher written in Prolog
Use case: processing multiple graphs
openCypher Technology Compatibility Kit (TCK)
Cypher Editor in the Web
The inGraph project and incremental evaluation of Cypher queries

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
cuic standard and advanced reporting.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf

openCypher: Naming and Addressing Multiple Graphs

  • 1. opencypher.org | opencypher@googlegroups.comopencypher.org | opencypher@googlegroups.com Multiple Graph Processing Naming and Addressing Alastair Green Neo Technology Cypher Language Group
  • 2. opencypher.org | opencypher@googlegroups.com Problem #1 Loading and saving > 1 Store → > 1 persistent graph Local File System BOLT
  • 3. opencypher.org | opencypher@googlegroups.com Problem #1 Loading and saving Neo4j instance = 1 graph Local File System BOLT GraphX/Frame conventional V+E files = 1 graph Neo4j CSV fileset = 1 graph .graphml = 1 graph .nq = n graphs
  • 4. opencypher.org | opencypher@googlegroups.com Containers and storage (rep + encoding) standards Storage type Container type URI scheme Storage Format PG? Neo4j Neo4j Server bolt:// Opaque Y CSV fileset LFS, HDFS ... file://, hdfs:// Under-specified Y .graphml LFS, HDFS ... file://, hdfs:// Well-specified N GraphX/Frames V+E files HDFS, LFS, ... file://, hdfs:// Under-specified N N-Quads LFS, HDFS, ... file://, hdfs:// Well-specified N ...
  • 5. opencypher.org | opencypher@googlegroups.com URI [+ directory/file convention] [+ PG convention] How do we know where to find edges and vertices? file:///path/to/the/data/devices/edges/*.csv | .txt file:///path/to/the/data/devices/vertices/*.csv How do we know where to find labels/types in *.csv? What happens if we want to model graph properties? ■ These questions have to be answered by (small) specifications ■ Conventional/assumed answers may not be systematic or complete
  • 6. opencypher.org | opencypher@googlegroups.com graph:// URIs A URI scheme that can ■ incorporate other URI schemes ■ register/refer to sub-specifications or URI scheme extensions that define PG conventions ■ allow the hierarchical path convention used by many URI schemes to be used to locate/identify containers or “spaces” ■ allows every path to terminate with the unqualfied name of a graph graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’ The meaning/depth of the path is implementation determined It might imply folders, partitions or instances or tenants … or nothing
  • 7. opencypher.org | opencypher@googlegroups.com Loading and saving graphs in Cypher queries* IN GRAPH EuropeSocialNetwork AT graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’ MATCH (p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1) CREATE (t:FriendsTriangle), (t)-[:contains]->(p1), (t)-[:contains]->(p2), (t)-[:contains]->(p3) IN GRAPH FriendsTriangles AT graph://graphml+pg/’hdfs://my-big-data/europe/snapshots/2017-08-23/friendsTriangles’ * Example use case and pattern concepts from LDBC QL TF input by Hannes Voigt Load Save
  • 8. opencypher.org | opencypher@googlegroups.com Or perhaps … or as well GRAPH [europe] AT graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’ IN GRAPH europe MATCH (p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1) DEFAULT GRAPH AT graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’ MATCH (p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1) Implicit? Anonymous Explicit
  • 9. opencypher.org | opencypher@googlegroups.com Problem #2 Graphs in the scope of queries Cypher queries are made up of parts ■ Intermediate results are chained from part to part ■ We will want to allow those results to be graphs ■ There could be more than one, so names are needed ■ And it might be good to allow intermediate graphs to be persisted WITH or IN? A named graph could have global scope in the query (cf. current Cypher anon graph) This would mean it could always be referred to in a later part And also used in RETURN as a final result
  • 10. opencypher.org | opencypher@googlegroups.com Problem #3 Graphs in the scope of sub-queries A sub-query must be able to return a graph IN {IN GRAPH someGraph MATCH CREATE ... AS GRAPH} // anonymous MATCH ... and it might be useful to name it (and perhaps persist it) for later reference DECLARE DEFAULT GRAPH AT graph://bolt/’bolt+routing://neo4j-server:4567/social-networks/europe’ IN {MATCH ... CREATE ... AS GRAPH g [AT <url>]} // named [optionally saved] MATCH ...
  • 11. opencypher.org | opencypher@googlegroups.com Problem #4 Queries returning graphs Persisting a graph is not the same as returning a graph to a caller ■ Critical to allowing graph queries to be part of function chains ■ May be more than one graph that results from a query ■ If so then each graph needs a name CREATE (t:FriendsTriangle), (t)-[:contains]->(p1), (t)-[:contains]->(p2),(t)-[:contains]->(p3) IN GRAPH FriendsTriangles RETURN FriendsTriangles
  • 12. opencypher.org | opencypher@googlegroups.com Problem #5 Views Logically we compose queries as functions over views q(v(G)) IN GRAPH EuropeSocialNetwork MATCH (p1)-[:friends]-(p2)-[:friends]-(p3)-[:friends]-(p1) CREATE (t:FriendsTriangle), (t)-[:contains]->(p1), (t)-[:contains]->(p2), (t)-[:contains]->(p3) IN GRAPH FriendsTriangles AS VIEW IN GRAPH FriendsTriangles MATCH ...