SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Graph Database Query Languages
Jay Coskey
2018-09-05
slideshare.net/jaycoskey
1
2
• Databases, Graphs, and Graphviz
• Property Graphs & Cypher
• TinkerPop & Gremlin
• Knowledge Graphs/Triples
• Conclusions
Graph Query Languages
Databases, Graphs, and Graphviz
3
Types of Databases
4
Commercial examples Open Source examples
Relational DBs Oracle, MSFT SQL Server MySQL/Maria, Postgres
Column family DBs (think CSVs) Apache Cassandra, Apache HBase
Key-value stores AWS DynamoDB, Oracle Berkeley DB Redis
Document DBs Apache Couchbase, MongoDB
Graph DB — Property Graph
(for traversing relations in data)
neo4j, DataStax Enterprise Graph,
Amazon Neptune, Memgraph
JanusGraph (from Titan), Dgraph
Graph DB — RDF
(for finding relations in data)
Stardog, onotext, AllegroGraph blazegraph
Graph DB — Multi-Model
(e.g., doc store w/ graph layer)
ArangoDB, ElasticSearch, OrientDB, SAP,
MSFT CosmosDB, Virtuoso Universal Server
Graph processing frameworks
(Apache)
TinkerPop & Gremlin
Spark GraphX
Giraph & Hama (Hadoop) & S2Graph
Graph processing frameworks
(Non-Apache)
Oracle, ThingSpan, InfoGrid
GraphBase, Trovares xGT
Apache Hama
Graphs
Graph = 2-tuple: <V, E>
• V = set of vertices
• E = set of edges
(possibly with properties)
Directed:
V = {A, B, C, D, E, F}
E = {
(A, E), (D, B),
(B, C), (C, F), (F, E), (E, B)
}
A B C
D E F
• Weighted graph: A graph with values (weights) associated with edges
• Example: A graph with a cost for each edge traversal
• Multigraph: Vertex pairs can be connected by multiple edges
• Example: Multiple emails can be sent from personA to personB
• See Wikipedia's Glossary of graph theory terms for much more.
A B
D E
w=0.75 w=2.1
A B
D E
5
Visualizing Graphs with Graphviz (dot)
digraph G { // Layout not right
A -> E[color=red,label=0.75];
D -> B[color=red,label=2.1];
B -> C[color=red];
C -> F[color=red];
F -> E[color=red];
E -> B[color=red];
A [style=filled, color="#a0a0ff"];
B [style=filled, color="#a0a0ff"];
C [style=filled, color="#a0a0ff"];
D [style=filled, color="#a0a0ff"];
E [style=filled, color="#a0a0ff"];
F [style=filled, color="#a0a0ff"];
}
digraph G {
rankdir=LR;
// Same content as at left
subgraph left { rankdir=TB; rank=same; A; D; };
subgraph center { rankdir=TB; rank=same; B; E; };
subgraph right { rankdir=TB; rank=same; C; F; };
}
% dot –Tpng mygraph.dot > mygraph.png # dot file format below with output
6
Visualizing Graphs with Graphviz (pydot)
from pydot import Dot, Edge, Node, Subgraph
import random
import string
def main():
vdict = {label: Node(label, style='filled', fillcolor='#a0a0ff')
for label in list('ABCDEF')
}
verts = vdict.values()
graph = Dot(graph_type='digraph', rankdir='LR')
def add_edge(src, dst, label='', color='red'):
graph.add_edge(Edge(vdict[src], vdict[dst], label=label, color=color))
def add_subgraph(label_chars):
sg_name = ''.join(random.choice(string.ascii_lowercase) for _ in range(5))
sg = Subgraph(sg_name, rankdir='TB', rank='same')
for v in get_verts(list(label_chars)):
sg.add_node(v)
graph.add_subgraph(sg)
def get_verts(label_chars):
return [vdict[label] for label in label_chars]
7
for v in verts:
graph.add_node(v)
add_edge('A', 'E', label=0.75); add_edge('D', 'B', label=2.1)
add_edge('B', 'C'); add_edge('C', 'F')
add_edge('F', 'E'); add_edge('E', 'B')
add_subgraph('AD')
add_subgraph('BE')
add_subgraph('CF')
graph.write_dot(mygraph.dot')
graph.write_png(mygraph.png') // Can output multiple formats
Graphviz — Other Examples
8
Property Graphs & Cypher
9
Property Graphs
10
• Property Graphs have (many?) properties associated with vertexes and/or edges.
• Example: Family tree metadata: supporting (conflicting?) documents, uncertainty, etc.
First words
Adoption details
Inventions
Nickname
Earings, necklace
Suitors
Catchphrases Photos
Monolithic representation
vs.
Property-based
mix & match link & layer
Simpsons image from englishexercises.org
Some Property Graph Domains
11
Domain Sample Entities & Properties Sample Application
Airline travel Airplane, Flight Attendant, Departure, Engineer, Passenger, Pilot, Route Optimize staff assignments
Case law Case, Defendant, Jurisdiction, Law, Prosecutor, Ruling, Trial, Verdict Choose which cases to cite
Criminal Investigation Person, Email, Jurisdiction, PhoneCall, TimeSpan, University, Workplace Identify suspicious activity
Genealogy Person, Adoption, Birth, Burial, Child, Death, Marriage, Parent, Spouse Family tree match
Language origins Word, Document, IsReconstructed, Language, Pronunciation, UsageDate Linguistic phylogenetics
Medicine Patient, Death, Diagnosis, Doctor, Drug, Measurement, Treatment Finding patient zero
Movies Movie, Actor, Director, Language, Length, Producer, Rating, Review, Year Casting; Distance to Kevin Bacon
Social networks User, Ad, AdCampaign, AdPlacement, DateTime, Group, Message, Post Recommend friends
Supply chain mgmt Product, Carrier, Cost, LocDst, LocSrc, Quantity, Shipment, Warehouse Optimize ordering & delivery
System Engineering Component, FailureRate, Inputs, RecoveryTime, OutageCost, Outputs Root cause determination
Modeling Graphs in SQL: It can be done ...
WITH subordinates (id, name) AS (
SELECT id, name FROM org_chart AS _base
WHERE boss_name = 'Alice'
)
UNION ALL
(
SELECT id, name FROM org_chart AS _next, subordinates AS subs
WHERE _next.boss_id = subs.id
)
SELECT id, name FROM subordinates;
12
Query adapted from Joe Celko's Trees and Hierarchies in SQL for Smarties
recursion
org_chart
id
name
boss_id
boss_name
Modeling Graphs in SQL: ... but sometimes it shouldn't
SQL supports indexes to improve query performance:
But ...
• Native Graph DBs instead use storage, processing, and indexing optimized for graphs.
• They "pre-materialize" (i.e., index/cache) relationships to improve performance.
13
Small memory footprint Few page loads Efficient query
Index to search only
the columns needed
Clustered indexes to search
fewer blocks
Long path queries
have many joins
Exploding number
of paths
Large memory
footprint
Domain Edges/Vertex
Org Charts A handful
Emails 100s or 1000s
Network traffic Millions
Example of Neo4j's Cypher Syntax (MATCH)
14
MATCH ( movie: Movie { title: "The Matrix" } )
RETURN movie
1
This label is not necessary, but can
greatly improve performance.
The parentheses here are required.
They signify a vertex/node.
More Examples of Cypher Syntax (MATCH)
15
MATCH (user)->[:FRIEND]->(friend)
WHERE user.name = "Amy"
WITH user, count(friend) AS num_friends
WHERE num_friends >= 10
RETURN user // Users named Amy w/ 10+ friends
MATCH (u)->[:FRIEND]->(f1)->[:FRIEND]->(foaf),
(u)->[:FRIEND]->(f2)->[:FRIEND]->(foaf)
WHERE f1 <> f2
RETURN u, foaf // Friends of friends by 2+ connections
topological constraints
Before WITH After WITH
user, friend user, num_friends
f1
f2
foafu
f1 f10
Amy
2
3
vertex vertexedge
v e v e v
Refresher on SQL SELECT Syntax
As written:
SELECT ...
[ FROM ... [JOIN ... ] ]
[ WHERE ...]
[ GROUP BY ... ]
[ HAVING ... ]
[ ORDER BY ... ]
[ WINDOW ... ]
16
Order of execution:
FROM
JOIN
OUTER
WHERE -- Pre-filter
GROUP BY -- Aggregation
HAVING -- Post-filter
SELECT
DISTINCT
ORDER BY
LIMIT/TOP
-- Result
-- Source
(Lots of syntactic details left out)
Comparison: SQL SELECT vs Cypher's MATCH Syntax
SQL:
SELECT cols
[ FROM ... [JOIN ... ] ]
[ WHERE ...]
[ GROUP BY ... ]
[ HAVING ... ]
[ ORDER BY ... ]
[ WINDOW ... ]
17
Cypher:
[MATCH paths WHERE ...]
[OPTIONAL MATCH paths WHERE ...]
[WITH ... [ORDER BY ...] [SKIP ...] [LIMIT ...]]
RETURN exprs
[ORDER BY ...] [SKIP ...] [LIMIT ...]
MATCH clause: Names, types, and topology
RETURN clause: What is returned to the caller.
The SELECT clause specifies
what is returned to the caller,
and what those values are called.
topological constraints
Cypher: MATCH Syntax Details
• Specify patterns of paths: (vertex) and ->[edge]-> and <-[edge]<-
• Allow for variable length paths: ->[edge*2..]->
• Allow specification of type: (v:Employee), [e:ReportsTo]
• Allow specification of property values: (v: {name: 'Amy', isActive: true})
• Many things work (mostly) like in SQL:
• dates, math/string functions, NULL, UNION, CASE clauses, MERGE, user-defined stuff,, etc.
• Some differences:
18
UNWIND converts a list to rows collect() converts rows to a list
UNWIND [1, 2, 3, NULL] AS x
RETURN x, 'val' AS y // Returns 4 rows
// Earlier, we would have used FOREACH
WITH [1, 1, 2, 2] AS coll
UNWIND coll AS x
WITH DISTINCT x
RETURN collect(x) AS setOfVals
Examples of a Variable Length Paths (MATCH)
19
// Note: Path vars can be assigned in MATCH, CREATE, & MERGE statements
MATCH p = shortestPath(
(emma:Person {name:"Emma Watson"})-[*]-(bacon:Person {name:"Kevin Bacon"})
)
RETURN p // The path from Emma Watson to Kevin Bacon
MATCH (a: { name: 'Amy' })<-[e:ReportsTo:*2..]<-(emp)
WHERE a.isActive = true AND emp.isActive = true
RETURN emp.empId, emp.firstName, emp.lastName // Indirect reports of Amy
4
5
Property Graphs: Performance Issues
20
Factors that can greatly impact graph query performance:
• Size/Complexity. Paths lengths & count of connected components
• Memory management — The number of page accesses
a. The WITH statement promotes memory efficiency
b. Indexes can reduce the number of memory accesses
• Concurrency — Multiple tasks queued up simultaneously
• Parallelism — Multiple tasks executing simultaneously
• E.g.: Vector processing executes identical instructions simultaneously
Note: Cartesian products between disconnected patterns
cause warnings.
Cypher: Performance Optimization
21
Optimization Examples
Note: Cypher has an EXPLAIN statement.
Note: Some MATCHES benefit from choosing a START node.
Add INDEX hints after a MATCH clause:
USING INDEX variable:Label(property)
USING INDEX SEEK variable:Label(property)
// Multiple USING clauses can be used.
MATCH ... liskov:Scientist {name: 'Liskov'} ...
USING INDEX liskov:Scientist(name)
RETURN liskov.born AS birthdate
Add SCAN hints after a MATCH clause:
USING SCAN variable:Label
MATCH { s:Scientist }
USING SCAN s:Scientist
WHERE s.born < 1939
RETURN s.born AS birthdate
Add USING JOIN ON to provide JOIN hints. USING JOIN ON liskov
USING PERIODIC COMMIT with LOAD CSV commits the
current transaction periodically to minimize memory use, at
the cost of breaking transactional isolation.
USING PERIODIC COMMIT 500
By default, Neo4j uses a cost-based planner
with a statistics service. The user can set config
dbms.cypher.planner to RULE, & prepend queries
with CYPHER planner = rule
TinkerPop & Gremlin
22
Graph Frameworks
• If you don't need the persistence & multi-user concurrency of databases:
• Apache Spark's GraphX is popular for data pipelines, and supports distributed queries.
val graph = GraphLoader.edgeListFile(sc, "data/graphx/followers.txt")
val ranks = graph.pageRank(0.0001).vertices
val users = sc.textFile("data/graphx/users.txt").map { line =>
val fields = line.split(",")
(fields(0).toLong, fields(1))
}
val ranksByUsername = users.join(ranks).map { case (id, (username, rank)) => (username, rank) }
• (Parallel) Boost Graph Library (BGL) is a parallel version of the classic C++ BGL.
typedef adjacency_list<listS, vecS, directedS, no_property, property<edge_weight_t, int>> Graph;
typedef graph_traits<Graph>::vertex_descriptor Vertex;
typedef std::pair<int,int> Edge; // Graph algorithms similarly templatized
• NetworkX is a Python graph library.
nx.draw(flights, pos=airport2latlong, alpha=0.75)
• Seattle's Trovares has a property graph engine called xGT, focused on
distributed performance. It might someday also feature a database.
• We'll focus on a framework called TinkerPop.
23
GraphX query from PageRankExample.scala in Apache Spark's github repo
TinkerPop & Gremlin
• Apache TinkerPop is an interface for computing with
(OLTP) graph DBs & (OLAP) graph analytical systems.
• Write once  Run on many DB engines.
• It comes with lots of tools/features:
• Platform-agnostic: Gremlin console & server, TinkerGraph
• Platform-specific: SparkGraphComputer & Hadoop support
• Supporting systems:
• Blazegraph, ChronoGraph, DataStax Enterprise Graph,
• JanusGraph, Neo4j, OrientDB, Stardog, etc.
• Languages with Gremlin APIs:
• Clojure, Groovy, Java, .NET, Python, Scala
• SPARQL & SQL can both be compiled to Gremlin
24
TinkerGraph diagram
Gremlin Examples
• Gremlin is a functional, data-flow (i.e., fluent) graph traversal language. Think LINQ.
• g.v("Amy").outE('friend').inV().age; // Ages of all Amy's friends
• g.V().interval("age", 25, 35); // People ages 25-35 (interval)
• g.V().filter{ it.age >= 25 }.filter{ it.age <= 35 }; // People ages 25-35 (lambdas)
• g.V().and(_().has('age', T.ge, 25), _().has('age', T.le, 35)); // People ages 25-35
• g.V().hasLabel("person").
pageRank().
by("friendRank").
by(outE("knows"))
order().by("friendRank", desc).
limit(10) // 10 highest-friend-ranked people
25
Plus, Gremlin has a REPL!! (Called the console)
The TinkerPop family:
Knowledge Graphs / Triples
26
Knowledge Graphs
27
• The drive for the semantic web led to Triplestores, or Resource Description Framework (RDF) stores.
• Graphs reduced to a canonically simple representation, using additional nodes instead of properties.
• Standardized "vocabularies" provide nuanced meanings (e.g., indep vs. dep continuants & occurrents)
• SQL provides syntactially uniform schemas to a domain. RDF provides flexible semantic schemas.
• Each triple is of the form <Subject, Predicate, Object> (Often these are URLs, for uniqueness.)
• Each triple represents a single edge.
• Examples (from Contacts): Person.name, age, birthdate
• Examples (from Geography): Capitol, City, Continent, Country
• An ontology is a standard set of triples. A knowledge graph is a dataset conforming to a set of ontologies.
• Ontologies or "vocabularies" can be imported via their prefix and reference URL.
Africa
Kenya
Senegal
EgyptCairo
Dakar
Nairobi
isCapital
isInContinent
Knowledge Graph Examples
28
etiological process
produces
disorder
bears
disposition
pathological
process
realized_in
abnormal
bodily
features
diagnosis interpretive
process /
tests
used_in
signs &
symptoms recognized_asproduces
Pathology
& Diagnosis
People
& Skills
Pathology image from Basic Formal Ontology: A Common Standard, by Barry Smith; skills diagram adapted from computer.org
Pizza & Toppings
SPARQL (RDF Query Language) Queries
29
SELECT (COUNT(?item) AS ?count) # List all persons on Wikidata
WHERE { ?item wdt:P31 wd:Q5 . } # P31 = is-instance-of. Q5 = Human. Result = 4,502,374 (Pedro Aguirre Cerda, etc.)
SELECT (COUNT(?item) AS ?count) # List all categories of persons on Wikidata
WHERE { ?item wdt:P279+ wd:Q5 . } # P279 = is-category-of. Result = 812 (child, man, woman, Asian, astronaut, author, etc.)
SELECT * WHERE { # List person-mother couples in the Terminator universe
?jc wdt:P1080 wd:Q620588 . # P1080 = is-in-fictional-universe; Q620588 = Terminator
?jc rdfs:label ?jc_lbl .
FILTER (langMatches(lang(?jc_lbl), "en"))
?jc wdt:P25 ?sc . # ?sc is-mother-of ?jc
?sc rdfs:label ?sc_lbl .
FILTER (lang(?sc_lbl) = "en") # Result
}
PREFIX geo: <http://www.geography.org/schema.rdf> # Find African countries/capitals
SELECT ?country ?capital # The wildcard character * would return these names as well as ?x & ?y.
WHERE {
?x:City geo:cityname ?capital ; # ?x has name ?capital
geo:isCapitalOf ?y . # Subject x is implied
?y:Country geo:countryname ?country ; # y has name ?country
geo:isInContinent geo:Africa . # y is in Africa
} # Sample query from Wikipedia
Prefix Meaning
wdt Wikidata type
rdfs RDF Schema
jc jc_lbl sc sc_lbl
wd:Q376577 John Connor wd:Q496437 Sarah Connor
1
2
3
4
Semi-colon: Subject carries over to next statement
Comma: Subject & predicate carry over
Regex-like RDF Path Expressions
30
Syntax Meaning
path+, path*, path? Specified range of copies
path{n,m}, path{n}, path{n,}, path{,m} Specified range of copies
path1|path2 Alternation: a choice of paths
path1/path2 A sequence of paths
^path1 Reversal of path (obj -> subj instead of subj -> obj)
SELECT (COUNT(?item) AS ?count)
WHERE { ?item wdt:P279+ wd:Q5 . } # One or more category-of-person tags
Some Ontologies
31
Prefix Description URI
rdf Resource Description Framework http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs RDF Schema http://www.w3.org/2000/01/rdf-schema#
bfo Basic Formal Ontology http://www.ifomis.org/bfo/1.1
bio Biographical information http://purl.org/vocab/bio/01
dc Dublin Core http://purl.org/dc/elements/1.1
foaf Friend of a Friend http://xmlns.com/foaf/0.1
geo Latitude, longitude, altitude http://www.w3.org/2003/01/geo/wgs84_pos#
gfo General Formal Ontology http://www.onto-med.de/ontologies/gfo.owl#
gr Good Relations: Products Sold Online http://purl.org/goodrelations/v1
owl Web Ontology Language http://www.w3.org/2002/07/owl#
owl-time Temporal references (Date + time) http://www.w3.org/2006/time#
prov Provenance http://www.w3.org/ns/prov#
qo Quality measurements http://purl.org/qual/qual-o
sem Simple Event Model http://semanticweb.cs.vu.nl/2009/11/sem/
sioc Socially Interconnected Online Communities http://rdfs.org/sioc/spec
ssn Semantic Sensor Network (Sensors & Observations) http://purl.oclc.org/NET/ssnx/ssn
trn Transit http://vocab.org/transit
xsd XML Schema http://www.w3.org/2001/XMLSchema#
SPARQL: Syntax (SELECT)
32
BASE ... // Provide lexical prefixes for URLs
PREFIX ... // Reference vocabularies, such as rdf, rdfs, owl, xsd, dc, foaf
SELECT ...
FROM ...
FROM NAMED ... // The default dataset is the MERGE of all the FROM graphs
WHERE { ... FILTER ... GRAPH ... OPTIONAL ... SERVICE ... UNION ... }
GROUP BY ...
HAVING ...
ORDER BY ...
LIMIT ...
OFFSET ...
BINDINGS VALUES ...
Other SPARQL queries besides SELECT:
• ASK Ask whether there are matches: true/false
• CONSTRUCT Build RDF triples/graphs
• DESCRIBE Return RDF triples describing the given entity
Some non-query commands: CLEAR, CREATE, DELETE, DROP, INSERT, LOAD
Define temporary graphs
Communicate with remote endpoint, using SPARQ protocol
SPARQL's version of OUTER joins
RDF Collections
33
A subject or object can be a collection (cons-style lists):
( "apple" "banana" )
is shorthand for
[ rdf:first "apple";
rdf:rest [ rdf:first "banana";
rdf:rest rdf:nil
]
]
RDF collections can be nested.
Conclusions
34
n-Ary Relationships
35
• In knowledge graphs, n-ary relationships can be represented as nodes that
represent multi-entity relationships.
"Brutus stabbed Caesar with a knife at the Theater of Pompey on Mar 15, 44 BCE. "
Brutus Caesar
stabs
{ weapon: 'knife',
where: 'Theater of Pompey',
date: 'Mar 15, 44 BCE' }
Brutus CaesarStabbing
isSubject isObject
Knife
weapon where
44 BCE
when
Theater
Property Graph Knowledge Graph
Choosing Between Graph Databases
36
• In general, native graph DBs provide better the best graph performance.
• Property graph DBs are better for navigating relationships.
• E.g., Supply chain DB
• Knowledge graph DBs are better at discovering relationships.
• E.g., Criminal activity DB
Resources
37
Resources: Online SPARQL REPLs
38
Name URL Description
DBPedia http://dbpedia.org/sparql Data from Wikipedia
bio2rdf http://bio2rdf.org/sparql Bioinformatics data from ~40 public DBs
Wikidata https://query.wikidata.org Wikidata
Ontotext http://data.ontotext.com/sparql Ontotext demo
Resources: Other
Property Graphs
• Cypher refcard: https://neo4j.com/docs/cypher-refcard/current/
• Cypher Improvement Proposals (CIPs): https://www.opencypher.org/cips
• Efficient graph algorithms in Neo4j: https://neo4j.com/blog/efficient-graph-algorithms-neo4j/
TinkerPop & Gremlin
• Overview of Gremlin: http://tinkerpop.apache.org/gremlin.html
• The Gremlin Compendium, by Doan DuyHai: http://www.doanduyhai.com/blog/?p=13460
• List of platforms supporting TinkerPop: http://tinkerpop.apache.org/providers.html
Knowledge Graphs
• Defining N-ary relationships on the Semantic Web: https://www.w3.org/TR/swbp-n-aryRelations/
• SPARQL FAQ: http://www.thefigtrees.net/lee/sw/sparql-faq
• SPARQL RDF Reference v1.8: https://www.dajobe.org/2005/04-sparql/SPARQLreference-1.8.pdf
• W3C docs:
• RDF datasets: https://www.w3.org/wiki/DataSetRDFDumps
• RDF concepts: https://www.w3.org/TR/rdf11-concepts/
• SPARQL Extensions: https://www.w3.org/wiki/SPARQL/Extensions
• SPARQL Overview: https://www.w3.org/TR/sparql11-overview/
• SPARQL Protocol: https://www.w3.org/TR/sparql11-protocol/
• Turtle: Terse RDF Triple Language: https://www.w3.org/TeamSubmission/turtle/
• Wikibooks: https://en.wikibooks.org/wiki/SPARQL
39

Weitere ähnliche Inhalte

Was ist angesagt?

Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4jNeo4j
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j FundamentalsMax De Marzi
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j PresentationMax De Marzi
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache CalciteJordan Halterman
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4jjexp
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenLorenzo Alberton
 
Workshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceNeo4j
 
Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseNeo4j
 
An overview of Neo4j Internals
An overview of Neo4j InternalsAn overview of Neo4j Internals
An overview of Neo4j InternalsTobias Lindaaker
 
Dynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationDynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationOri Reshef
 
Neo4j Data Science Presentation
Neo4j Data Science PresentationNeo4j Data Science Presentation
Neo4j Data Science PresentationMax De Marzi
 
GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphNeo4j
 
Intro to Neo4j - Nicole White
Intro to Neo4j - Nicole WhiteIntro to Neo4j - Nicole White
Intro to Neo4j - Nicole WhiteNeo4j
 
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data Science
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data ScienceScaling into Billions of Nodes and Relationships with Neo4j Graph Data Science
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data ScienceNeo4j
 
Workshop - Build a Graph Solution
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph SolutionNeo4j
 

Was ist angesagt? (20)

Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4j
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache Calcite
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4j
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and when
 
Workshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data Science
 
Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash course
 
Graph database
Graph database Graph database
Graph database
 
An overview of Neo4j Internals
An overview of Neo4j InternalsAn overview of Neo4j Internals
An overview of Neo4j Internals
 
Dynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationDynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisation
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Neo4j Data Science Presentation
Neo4j Data Science PresentationNeo4j Data Science Presentation
Neo4j Data Science Presentation
 
GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge Graph
 
Intro to Neo4j - Nicole White
Intro to Neo4j - Nicole WhiteIntro to Neo4j - Nicole White
Intro to Neo4j - Nicole White
 
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data Science
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data ScienceScaling into Billions of Nodes and Relationships with Neo4j Graph Data Science
Scaling into Billions of Nodes and Relationships with Neo4j Graph Data Science
 
Neo4j graph database
Neo4j graph databaseNeo4j graph database
Neo4j graph database
 
Workshop - Build a Graph Solution
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph Solution
 

Ähnlich wie Graph Database Query Languages

Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!Boy Baukema
 
Neo4j: Import and Data Modelling
Neo4j: Import and Data ModellingNeo4j: Import and Data Modelling
Neo4j: Import and Data ModellingNeo4j
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)jaxLondonConference
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Practical pig
Practical pigPractical pig
Practical pigtrihug
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop NotesPamela Fox
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxcarliotwaycave
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Jonathan Felch
 
Working with Complex Types in DataFrames: Optics to the Rescue
Working with Complex Types in DataFrames: Optics to the RescueWorking with Complex Types in DataFrames: Optics to the Rescue
Working with Complex Types in DataFrames: Optics to the RescueDatabricks
 
Free Based DSLs for Distributed Compute Engines
Free Based DSLs for Distributed Compute EnginesFree Based DSLs for Distributed Compute Engines
Free Based DSLs for Distributed Compute EnginesJoydeep Banik Roy
 
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward
 
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward
 
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven LottAvoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven LottPyData
 
Python Programming.pptx
Python Programming.pptxPython Programming.pptx
Python Programming.pptxSudhakarVenkey
 

Ähnlich wie Graph Database Query Languages (20)

DataMapper
DataMapperDataMapper
DataMapper
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
 
Neo4j: Import and Data Modelling
Neo4j: Import and Data ModellingNeo4j: Import and Data Modelling
Neo4j: Import and Data Modelling
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
 
SQL introduction
SQL introductionSQL introduction
SQL introduction
 
Big Data Analytics Part2
Big Data Analytics Part2Big Data Analytics Part2
Big Data Analytics Part2
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Practical pig
Practical pigPractical pig
Practical pig
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
 
SAS Internal Training
SAS Internal TrainingSAS Internal Training
SAS Internal Training
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
 
Working with Complex Types in DataFrames: Optics to the Rescue
Working with Complex Types in DataFrames: Optics to the RescueWorking with Complex Types in DataFrames: Optics to the Rescue
Working with Complex Types in DataFrames: Optics to the Rescue
 
Free Based DSLs for Distributed Compute Engines
Free Based DSLs for Distributed Compute EnginesFree Based DSLs for Distributed Compute Engines
Free Based DSLs for Distributed Compute Engines
 
Apache pig
Apache pigApache pig
Apache pig
 
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
 
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
Flink Forward San Francisco 2019: Build a Table-centric Apache Flink Ecosyste...
 
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven LottAvoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
 
Python Programming.pptx
Python Programming.pptxPython Programming.pptx
Python Programming.pptx
 

Mehr von Jay Coskey

Python 3.6 Features 20161207
Python 3.6 Features 20161207Python 3.6 Features 20161207
Python 3.6 Features 20161207Jay Coskey
 
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic Inference
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic InferenceA Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic Inference
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic InferenceJay Coskey
 
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10Jay Coskey
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Jay Coskey
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Jay Coskey
 
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1Jay Coskey
 
SQL Server Select Topics
SQL Server Select TopicsSQL Server Select Topics
SQL Server Select TopicsJay Coskey
 
Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13Jay Coskey
 
Zippers: Derivatives of Regular Types
Zippers: Derivatives of Regular TypesZippers: Derivatives of Regular Types
Zippers: Derivatives of Regular TypesJay Coskey
 

Mehr von Jay Coskey (9)

Python 3.6 Features 20161207
Python 3.6 Features 20161207Python 3.6 Features 20161207
Python 3.6 Features 20161207
 
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic Inference
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic InferenceA Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic Inference
A Cosmic Hunt In The Berber Sky: An Introduction to Phylogenetic Inference
 
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10
Software Modeling of Contracts in Games and Finance, Part 1: 2018-01-10
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2
 
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1
 
SQL Server Select Topics
SQL Server Select TopicsSQL Server Select Topics
SQL Server Select Topics
 
Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13
 
Zippers: Derivatives of Regular Types
Zippers: Derivatives of Regular TypesZippers: Derivatives of Regular Types
Zippers: Derivatives of Regular Types
 

Kürzlich hochgeladen

꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 

Kürzlich hochgeladen (20)

꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 

Graph Database Query Languages

  • 1. Graph Database Query Languages Jay Coskey 2018-09-05 slideshare.net/jaycoskey 1
  • 2. 2 • Databases, Graphs, and Graphviz • Property Graphs & Cypher • TinkerPop & Gremlin • Knowledge Graphs/Triples • Conclusions Graph Query Languages
  • 4. Types of Databases 4 Commercial examples Open Source examples Relational DBs Oracle, MSFT SQL Server MySQL/Maria, Postgres Column family DBs (think CSVs) Apache Cassandra, Apache HBase Key-value stores AWS DynamoDB, Oracle Berkeley DB Redis Document DBs Apache Couchbase, MongoDB Graph DB — Property Graph (for traversing relations in data) neo4j, DataStax Enterprise Graph, Amazon Neptune, Memgraph JanusGraph (from Titan), Dgraph Graph DB — RDF (for finding relations in data) Stardog, onotext, AllegroGraph blazegraph Graph DB — Multi-Model (e.g., doc store w/ graph layer) ArangoDB, ElasticSearch, OrientDB, SAP, MSFT CosmosDB, Virtuoso Universal Server Graph processing frameworks (Apache) TinkerPop & Gremlin Spark GraphX Giraph & Hama (Hadoop) & S2Graph Graph processing frameworks (Non-Apache) Oracle, ThingSpan, InfoGrid GraphBase, Trovares xGT Apache Hama
  • 5. Graphs Graph = 2-tuple: <V, E> • V = set of vertices • E = set of edges (possibly with properties) Directed: V = {A, B, C, D, E, F} E = { (A, E), (D, B), (B, C), (C, F), (F, E), (E, B) } A B C D E F • Weighted graph: A graph with values (weights) associated with edges • Example: A graph with a cost for each edge traversal • Multigraph: Vertex pairs can be connected by multiple edges • Example: Multiple emails can be sent from personA to personB • See Wikipedia's Glossary of graph theory terms for much more. A B D E w=0.75 w=2.1 A B D E 5
  • 6. Visualizing Graphs with Graphviz (dot) digraph G { // Layout not right A -> E[color=red,label=0.75]; D -> B[color=red,label=2.1]; B -> C[color=red]; C -> F[color=red]; F -> E[color=red]; E -> B[color=red]; A [style=filled, color="#a0a0ff"]; B [style=filled, color="#a0a0ff"]; C [style=filled, color="#a0a0ff"]; D [style=filled, color="#a0a0ff"]; E [style=filled, color="#a0a0ff"]; F [style=filled, color="#a0a0ff"]; } digraph G { rankdir=LR; // Same content as at left subgraph left { rankdir=TB; rank=same; A; D; }; subgraph center { rankdir=TB; rank=same; B; E; }; subgraph right { rankdir=TB; rank=same; C; F; }; } % dot –Tpng mygraph.dot > mygraph.png # dot file format below with output 6
  • 7. Visualizing Graphs with Graphviz (pydot) from pydot import Dot, Edge, Node, Subgraph import random import string def main(): vdict = {label: Node(label, style='filled', fillcolor='#a0a0ff') for label in list('ABCDEF') } verts = vdict.values() graph = Dot(graph_type='digraph', rankdir='LR') def add_edge(src, dst, label='', color='red'): graph.add_edge(Edge(vdict[src], vdict[dst], label=label, color=color)) def add_subgraph(label_chars): sg_name = ''.join(random.choice(string.ascii_lowercase) for _ in range(5)) sg = Subgraph(sg_name, rankdir='TB', rank='same') for v in get_verts(list(label_chars)): sg.add_node(v) graph.add_subgraph(sg) def get_verts(label_chars): return [vdict[label] for label in label_chars] 7 for v in verts: graph.add_node(v) add_edge('A', 'E', label=0.75); add_edge('D', 'B', label=2.1) add_edge('B', 'C'); add_edge('C', 'F') add_edge('F', 'E'); add_edge('E', 'B') add_subgraph('AD') add_subgraph('BE') add_subgraph('CF') graph.write_dot(mygraph.dot') graph.write_png(mygraph.png') // Can output multiple formats
  • 8. Graphviz — Other Examples 8
  • 9. Property Graphs & Cypher 9
  • 10. Property Graphs 10 • Property Graphs have (many?) properties associated with vertexes and/or edges. • Example: Family tree metadata: supporting (conflicting?) documents, uncertainty, etc. First words Adoption details Inventions Nickname Earings, necklace Suitors Catchphrases Photos Monolithic representation vs. Property-based mix & match link & layer Simpsons image from englishexercises.org
  • 11. Some Property Graph Domains 11 Domain Sample Entities & Properties Sample Application Airline travel Airplane, Flight Attendant, Departure, Engineer, Passenger, Pilot, Route Optimize staff assignments Case law Case, Defendant, Jurisdiction, Law, Prosecutor, Ruling, Trial, Verdict Choose which cases to cite Criminal Investigation Person, Email, Jurisdiction, PhoneCall, TimeSpan, University, Workplace Identify suspicious activity Genealogy Person, Adoption, Birth, Burial, Child, Death, Marriage, Parent, Spouse Family tree match Language origins Word, Document, IsReconstructed, Language, Pronunciation, UsageDate Linguistic phylogenetics Medicine Patient, Death, Diagnosis, Doctor, Drug, Measurement, Treatment Finding patient zero Movies Movie, Actor, Director, Language, Length, Producer, Rating, Review, Year Casting; Distance to Kevin Bacon Social networks User, Ad, AdCampaign, AdPlacement, DateTime, Group, Message, Post Recommend friends Supply chain mgmt Product, Carrier, Cost, LocDst, LocSrc, Quantity, Shipment, Warehouse Optimize ordering & delivery System Engineering Component, FailureRate, Inputs, RecoveryTime, OutageCost, Outputs Root cause determination
  • 12. Modeling Graphs in SQL: It can be done ... WITH subordinates (id, name) AS ( SELECT id, name FROM org_chart AS _base WHERE boss_name = 'Alice' ) UNION ALL ( SELECT id, name FROM org_chart AS _next, subordinates AS subs WHERE _next.boss_id = subs.id ) SELECT id, name FROM subordinates; 12 Query adapted from Joe Celko's Trees and Hierarchies in SQL for Smarties recursion org_chart id name boss_id boss_name
  • 13. Modeling Graphs in SQL: ... but sometimes it shouldn't SQL supports indexes to improve query performance: But ... • Native Graph DBs instead use storage, processing, and indexing optimized for graphs. • They "pre-materialize" (i.e., index/cache) relationships to improve performance. 13 Small memory footprint Few page loads Efficient query Index to search only the columns needed Clustered indexes to search fewer blocks Long path queries have many joins Exploding number of paths Large memory footprint Domain Edges/Vertex Org Charts A handful Emails 100s or 1000s Network traffic Millions
  • 14. Example of Neo4j's Cypher Syntax (MATCH) 14 MATCH ( movie: Movie { title: "The Matrix" } ) RETURN movie 1 This label is not necessary, but can greatly improve performance. The parentheses here are required. They signify a vertex/node.
  • 15. More Examples of Cypher Syntax (MATCH) 15 MATCH (user)->[:FRIEND]->(friend) WHERE user.name = "Amy" WITH user, count(friend) AS num_friends WHERE num_friends >= 10 RETURN user // Users named Amy w/ 10+ friends MATCH (u)->[:FRIEND]->(f1)->[:FRIEND]->(foaf), (u)->[:FRIEND]->(f2)->[:FRIEND]->(foaf) WHERE f1 <> f2 RETURN u, foaf // Friends of friends by 2+ connections topological constraints Before WITH After WITH user, friend user, num_friends f1 f2 foafu f1 f10 Amy 2 3 vertex vertexedge v e v e v
  • 16. Refresher on SQL SELECT Syntax As written: SELECT ... [ FROM ... [JOIN ... ] ] [ WHERE ...] [ GROUP BY ... ] [ HAVING ... ] [ ORDER BY ... ] [ WINDOW ... ] 16 Order of execution: FROM JOIN OUTER WHERE -- Pre-filter GROUP BY -- Aggregation HAVING -- Post-filter SELECT DISTINCT ORDER BY LIMIT/TOP -- Result -- Source (Lots of syntactic details left out)
  • 17. Comparison: SQL SELECT vs Cypher's MATCH Syntax SQL: SELECT cols [ FROM ... [JOIN ... ] ] [ WHERE ...] [ GROUP BY ... ] [ HAVING ... ] [ ORDER BY ... ] [ WINDOW ... ] 17 Cypher: [MATCH paths WHERE ...] [OPTIONAL MATCH paths WHERE ...] [WITH ... [ORDER BY ...] [SKIP ...] [LIMIT ...]] RETURN exprs [ORDER BY ...] [SKIP ...] [LIMIT ...] MATCH clause: Names, types, and topology RETURN clause: What is returned to the caller. The SELECT clause specifies what is returned to the caller, and what those values are called. topological constraints
  • 18. Cypher: MATCH Syntax Details • Specify patterns of paths: (vertex) and ->[edge]-> and <-[edge]<- • Allow for variable length paths: ->[edge*2..]-> • Allow specification of type: (v:Employee), [e:ReportsTo] • Allow specification of property values: (v: {name: 'Amy', isActive: true}) • Many things work (mostly) like in SQL: • dates, math/string functions, NULL, UNION, CASE clauses, MERGE, user-defined stuff,, etc. • Some differences: 18 UNWIND converts a list to rows collect() converts rows to a list UNWIND [1, 2, 3, NULL] AS x RETURN x, 'val' AS y // Returns 4 rows // Earlier, we would have used FOREACH WITH [1, 1, 2, 2] AS coll UNWIND coll AS x WITH DISTINCT x RETURN collect(x) AS setOfVals
  • 19. Examples of a Variable Length Paths (MATCH) 19 // Note: Path vars can be assigned in MATCH, CREATE, & MERGE statements MATCH p = shortestPath( (emma:Person {name:"Emma Watson"})-[*]-(bacon:Person {name:"Kevin Bacon"}) ) RETURN p // The path from Emma Watson to Kevin Bacon MATCH (a: { name: 'Amy' })<-[e:ReportsTo:*2..]<-(emp) WHERE a.isActive = true AND emp.isActive = true RETURN emp.empId, emp.firstName, emp.lastName // Indirect reports of Amy 4 5
  • 20. Property Graphs: Performance Issues 20 Factors that can greatly impact graph query performance: • Size/Complexity. Paths lengths & count of connected components • Memory management — The number of page accesses a. The WITH statement promotes memory efficiency b. Indexes can reduce the number of memory accesses • Concurrency — Multiple tasks queued up simultaneously • Parallelism — Multiple tasks executing simultaneously • E.g.: Vector processing executes identical instructions simultaneously Note: Cartesian products between disconnected patterns cause warnings.
  • 21. Cypher: Performance Optimization 21 Optimization Examples Note: Cypher has an EXPLAIN statement. Note: Some MATCHES benefit from choosing a START node. Add INDEX hints after a MATCH clause: USING INDEX variable:Label(property) USING INDEX SEEK variable:Label(property) // Multiple USING clauses can be used. MATCH ... liskov:Scientist {name: 'Liskov'} ... USING INDEX liskov:Scientist(name) RETURN liskov.born AS birthdate Add SCAN hints after a MATCH clause: USING SCAN variable:Label MATCH { s:Scientist } USING SCAN s:Scientist WHERE s.born < 1939 RETURN s.born AS birthdate Add USING JOIN ON to provide JOIN hints. USING JOIN ON liskov USING PERIODIC COMMIT with LOAD CSV commits the current transaction periodically to minimize memory use, at the cost of breaking transactional isolation. USING PERIODIC COMMIT 500 By default, Neo4j uses a cost-based planner with a statistics service. The user can set config dbms.cypher.planner to RULE, & prepend queries with CYPHER planner = rule
  • 23. Graph Frameworks • If you don't need the persistence & multi-user concurrency of databases: • Apache Spark's GraphX is popular for data pipelines, and supports distributed queries. val graph = GraphLoader.edgeListFile(sc, "data/graphx/followers.txt") val ranks = graph.pageRank(0.0001).vertices val users = sc.textFile("data/graphx/users.txt").map { line => val fields = line.split(",") (fields(0).toLong, fields(1)) } val ranksByUsername = users.join(ranks).map { case (id, (username, rank)) => (username, rank) } • (Parallel) Boost Graph Library (BGL) is a parallel version of the classic C++ BGL. typedef adjacency_list<listS, vecS, directedS, no_property, property<edge_weight_t, int>> Graph; typedef graph_traits<Graph>::vertex_descriptor Vertex; typedef std::pair<int,int> Edge; // Graph algorithms similarly templatized • NetworkX is a Python graph library. nx.draw(flights, pos=airport2latlong, alpha=0.75) • Seattle's Trovares has a property graph engine called xGT, focused on distributed performance. It might someday also feature a database. • We'll focus on a framework called TinkerPop. 23 GraphX query from PageRankExample.scala in Apache Spark's github repo
  • 24. TinkerPop & Gremlin • Apache TinkerPop is an interface for computing with (OLTP) graph DBs & (OLAP) graph analytical systems. • Write once  Run on many DB engines. • It comes with lots of tools/features: • Platform-agnostic: Gremlin console & server, TinkerGraph • Platform-specific: SparkGraphComputer & Hadoop support • Supporting systems: • Blazegraph, ChronoGraph, DataStax Enterprise Graph, • JanusGraph, Neo4j, OrientDB, Stardog, etc. • Languages with Gremlin APIs: • Clojure, Groovy, Java, .NET, Python, Scala • SPARQL & SQL can both be compiled to Gremlin 24 TinkerGraph diagram
  • 25. Gremlin Examples • Gremlin is a functional, data-flow (i.e., fluent) graph traversal language. Think LINQ. • g.v("Amy").outE('friend').inV().age; // Ages of all Amy's friends • g.V().interval("age", 25, 35); // People ages 25-35 (interval) • g.V().filter{ it.age >= 25 }.filter{ it.age <= 35 }; // People ages 25-35 (lambdas) • g.V().and(_().has('age', T.ge, 25), _().has('age', T.le, 35)); // People ages 25-35 • g.V().hasLabel("person"). pageRank(). by("friendRank"). by(outE("knows")) order().by("friendRank", desc). limit(10) // 10 highest-friend-ranked people 25 Plus, Gremlin has a REPL!! (Called the console) The TinkerPop family:
  • 26. Knowledge Graphs / Triples 26
  • 27. Knowledge Graphs 27 • The drive for the semantic web led to Triplestores, or Resource Description Framework (RDF) stores. • Graphs reduced to a canonically simple representation, using additional nodes instead of properties. • Standardized "vocabularies" provide nuanced meanings (e.g., indep vs. dep continuants & occurrents) • SQL provides syntactially uniform schemas to a domain. RDF provides flexible semantic schemas. • Each triple is of the form <Subject, Predicate, Object> (Often these are URLs, for uniqueness.) • Each triple represents a single edge. • Examples (from Contacts): Person.name, age, birthdate • Examples (from Geography): Capitol, City, Continent, Country • An ontology is a standard set of triples. A knowledge graph is a dataset conforming to a set of ontologies. • Ontologies or "vocabularies" can be imported via their prefix and reference URL. Africa Kenya Senegal EgyptCairo Dakar Nairobi isCapital isInContinent
  • 28. Knowledge Graph Examples 28 etiological process produces disorder bears disposition pathological process realized_in abnormal bodily features diagnosis interpretive process / tests used_in signs & symptoms recognized_asproduces Pathology & Diagnosis People & Skills Pathology image from Basic Formal Ontology: A Common Standard, by Barry Smith; skills diagram adapted from computer.org Pizza & Toppings
  • 29. SPARQL (RDF Query Language) Queries 29 SELECT (COUNT(?item) AS ?count) # List all persons on Wikidata WHERE { ?item wdt:P31 wd:Q5 . } # P31 = is-instance-of. Q5 = Human. Result = 4,502,374 (Pedro Aguirre Cerda, etc.) SELECT (COUNT(?item) AS ?count) # List all categories of persons on Wikidata WHERE { ?item wdt:P279+ wd:Q5 . } # P279 = is-category-of. Result = 812 (child, man, woman, Asian, astronaut, author, etc.) SELECT * WHERE { # List person-mother couples in the Terminator universe ?jc wdt:P1080 wd:Q620588 . # P1080 = is-in-fictional-universe; Q620588 = Terminator ?jc rdfs:label ?jc_lbl . FILTER (langMatches(lang(?jc_lbl), "en")) ?jc wdt:P25 ?sc . # ?sc is-mother-of ?jc ?sc rdfs:label ?sc_lbl . FILTER (lang(?sc_lbl) = "en") # Result } PREFIX geo: <http://www.geography.org/schema.rdf> # Find African countries/capitals SELECT ?country ?capital # The wildcard character * would return these names as well as ?x & ?y. WHERE { ?x:City geo:cityname ?capital ; # ?x has name ?capital geo:isCapitalOf ?y . # Subject x is implied ?y:Country geo:countryname ?country ; # y has name ?country geo:isInContinent geo:Africa . # y is in Africa } # Sample query from Wikipedia Prefix Meaning wdt Wikidata type rdfs RDF Schema jc jc_lbl sc sc_lbl wd:Q376577 John Connor wd:Q496437 Sarah Connor 1 2 3 4 Semi-colon: Subject carries over to next statement Comma: Subject & predicate carry over
  • 30. Regex-like RDF Path Expressions 30 Syntax Meaning path+, path*, path? Specified range of copies path{n,m}, path{n}, path{n,}, path{,m} Specified range of copies path1|path2 Alternation: a choice of paths path1/path2 A sequence of paths ^path1 Reversal of path (obj -> subj instead of subj -> obj) SELECT (COUNT(?item) AS ?count) WHERE { ?item wdt:P279+ wd:Q5 . } # One or more category-of-person tags
  • 31. Some Ontologies 31 Prefix Description URI rdf Resource Description Framework http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs RDF Schema http://www.w3.org/2000/01/rdf-schema# bfo Basic Formal Ontology http://www.ifomis.org/bfo/1.1 bio Biographical information http://purl.org/vocab/bio/01 dc Dublin Core http://purl.org/dc/elements/1.1 foaf Friend of a Friend http://xmlns.com/foaf/0.1 geo Latitude, longitude, altitude http://www.w3.org/2003/01/geo/wgs84_pos# gfo General Formal Ontology http://www.onto-med.de/ontologies/gfo.owl# gr Good Relations: Products Sold Online http://purl.org/goodrelations/v1 owl Web Ontology Language http://www.w3.org/2002/07/owl# owl-time Temporal references (Date + time) http://www.w3.org/2006/time# prov Provenance http://www.w3.org/ns/prov# qo Quality measurements http://purl.org/qual/qual-o sem Simple Event Model http://semanticweb.cs.vu.nl/2009/11/sem/ sioc Socially Interconnected Online Communities http://rdfs.org/sioc/spec ssn Semantic Sensor Network (Sensors & Observations) http://purl.oclc.org/NET/ssnx/ssn trn Transit http://vocab.org/transit xsd XML Schema http://www.w3.org/2001/XMLSchema#
  • 32. SPARQL: Syntax (SELECT) 32 BASE ... // Provide lexical prefixes for URLs PREFIX ... // Reference vocabularies, such as rdf, rdfs, owl, xsd, dc, foaf SELECT ... FROM ... FROM NAMED ... // The default dataset is the MERGE of all the FROM graphs WHERE { ... FILTER ... GRAPH ... OPTIONAL ... SERVICE ... UNION ... } GROUP BY ... HAVING ... ORDER BY ... LIMIT ... OFFSET ... BINDINGS VALUES ... Other SPARQL queries besides SELECT: • ASK Ask whether there are matches: true/false • CONSTRUCT Build RDF triples/graphs • DESCRIBE Return RDF triples describing the given entity Some non-query commands: CLEAR, CREATE, DELETE, DROP, INSERT, LOAD Define temporary graphs Communicate with remote endpoint, using SPARQ protocol SPARQL's version of OUTER joins
  • 33. RDF Collections 33 A subject or object can be a collection (cons-style lists): ( "apple" "banana" ) is shorthand for [ rdf:first "apple"; rdf:rest [ rdf:first "banana"; rdf:rest rdf:nil ] ] RDF collections can be nested.
  • 35. n-Ary Relationships 35 • In knowledge graphs, n-ary relationships can be represented as nodes that represent multi-entity relationships. "Brutus stabbed Caesar with a knife at the Theater of Pompey on Mar 15, 44 BCE. " Brutus Caesar stabs { weapon: 'knife', where: 'Theater of Pompey', date: 'Mar 15, 44 BCE' } Brutus CaesarStabbing isSubject isObject Knife weapon where 44 BCE when Theater Property Graph Knowledge Graph
  • 36. Choosing Between Graph Databases 36 • In general, native graph DBs provide better the best graph performance. • Property graph DBs are better for navigating relationships. • E.g., Supply chain DB • Knowledge graph DBs are better at discovering relationships. • E.g., Criminal activity DB
  • 38. Resources: Online SPARQL REPLs 38 Name URL Description DBPedia http://dbpedia.org/sparql Data from Wikipedia bio2rdf http://bio2rdf.org/sparql Bioinformatics data from ~40 public DBs Wikidata https://query.wikidata.org Wikidata Ontotext http://data.ontotext.com/sparql Ontotext demo
  • 39. Resources: Other Property Graphs • Cypher refcard: https://neo4j.com/docs/cypher-refcard/current/ • Cypher Improvement Proposals (CIPs): https://www.opencypher.org/cips • Efficient graph algorithms in Neo4j: https://neo4j.com/blog/efficient-graph-algorithms-neo4j/ TinkerPop & Gremlin • Overview of Gremlin: http://tinkerpop.apache.org/gremlin.html • The Gremlin Compendium, by Doan DuyHai: http://www.doanduyhai.com/blog/?p=13460 • List of platforms supporting TinkerPop: http://tinkerpop.apache.org/providers.html Knowledge Graphs • Defining N-ary relationships on the Semantic Web: https://www.w3.org/TR/swbp-n-aryRelations/ • SPARQL FAQ: http://www.thefigtrees.net/lee/sw/sparql-faq • SPARQL RDF Reference v1.8: https://www.dajobe.org/2005/04-sparql/SPARQLreference-1.8.pdf • W3C docs: • RDF datasets: https://www.w3.org/wiki/DataSetRDFDumps • RDF concepts: https://www.w3.org/TR/rdf11-concepts/ • SPARQL Extensions: https://www.w3.org/wiki/SPARQL/Extensions • SPARQL Overview: https://www.w3.org/TR/sparql11-overview/ • SPARQL Protocol: https://www.w3.org/TR/sparql11-protocol/ • Turtle: Terse RDF Triple Language: https://www.w3.org/TeamSubmission/turtle/ • Wikibooks: https://en.wikibooks.org/wiki/SPARQL 39

Hinweis der Redaktion

  1. Use of the terms "Year of the graph database" and "Year of the graph" is on the rise. Facebook is the best-known example. Use at eBay's (virtual shopping assistant): https://www.youtube.com/watch?v=hRpmIeJjx-Y Use at NASA: https://neo4j.com/blog/nasa-critical-data-knowledge-graph/ Graph analytics and graph-based machine learning is also on the rise. E.g., Tiago de Paula Peixoto (https://skewed.de), author of the graph-tool Python module
  2. VS Code extensions: Cypher Query Language 1.0.2, by Jake Boone SPARQL Stardog RDF Grammars 0.0.6, by Stardog Union Some other Graph Systems (from tinkerpop.apache.org): Bitsy: A small, fast, embeddable, durable in-memory graph database Chronograph: A versioned graph database GRANK.AI: Distributed OLTP/OLAP knowledge graph system HGraphDB: OLTP graph database running on Apache HBase Huawei Graph Engine Service: Fully-managed, distributed, at-scale graph query and analysis service that provices a visualized interactive analytics platform. IBM Graph: OLTP graph database as a service Sqlg: OLPT implementation on SQL databases TinkerGraph: In-memory OLTP and OLAP reference implementation Titan: Distributed OLTP and OLAP graph databases with BerkeleyDB, Apache Cassandra and Apache HBase support Unipop: OLTP Elasticsearch and JDBC backend graph Written in C++: Memgraph Written in Go: DGraph Written in Java: Neo4j
  3. With very large graphs, aggregation or opacity become necessary visualization aids.
  4. The terms "mix & match" and "link and layer" come from a 2008 paper by Mark Tucker called 10 Things Genealogy Software Should Do. Much existing genealogy software used a "match and merge" approach. It should instead support a "link and layer" approach, like Photoshop uses. It should also support annotatation with metadata such as provenance of supporting evidence, scanned images, etc.
  5. The book Joe Celko's Trees and Hierarchies in SQL for Smarties, 2nd Edition covers the different ways to store graphs in relational DBs.
  6. Emma Watson co-starred with John Cleese in Harry Potter and the Chamber of Secrets (2002). John Cleese and Kevin Bacon co-starred in The Big Picture (1989).
  7. Via the openCypher project, the following also use Cypher: SAP HANA Graph (SAP HANA is German DB company: ""Systems, Applications & Products in Data Processing") This DB is an in-memory, column-oriented, RDMS. Redis (a key-value store) AgensGraph (a transactions graph DB based on Postgres)
  8. Neo4j default configuration settings: dbms.directories.import=import dbms.security.auth_enabled=true dbms.memory.heap.initial_size=512m dbms.memory.heap.max_size=1G dbms.memory.pagecache.size=512m dbms.connector.bolt.enabled=true dbms.connector.http.enabled=true dbms.connector.https.enabled=true ha.pull_interval=10 dbms.jvm.additional=-XX:+UseG1GC dbms.jvm.additional=-XX:-OmitStackTraceInFastThrow dbms.jvm.additional=-XX:+AlwaysPreTouch dbms.jvm.additional=-XX:+UnlockExperimentalVMOptions dbms.jvm.additional=-XX:+TrustFinalNonStaticFields dbms.jvm.additional=-XX:+DisableExplicitGC dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048 dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true dbms.windows_service_name=neo4j dbms.jvm.additional=-Dunsupported.dbms.udc.source=desktop
  9. Removed node_color='r' , edge_color='lightblue', node_size=30 from nx.draw statement.
  10. For a list of Gremlin functions, see http://gremlindocs.spmallette.documentup.com/
  11. Entities are either continuants or occurrents. =CONTINUANT= [SNAP: SNAPshot] A continuant is a thing or quality that exists at a moment in time, or at each of many moments in time. It maintains its identity through time. Examples include a person, breath, country, dog, email, or the Ship of Theseus. ==Dependent Continuant== Dependent continuant: a quality or a realizable entity. Non-realizable dependent continuant: Quality Realizable dependent continuants A "role" is an externally-grounded realizable entity. A "disposition" is an internally grounded realizible entity (e.g., ability to sweat) A "function" is a disposition that is designed or selected for. Also: plan, capability, tendency A disorder of an (extended) organism which serves as the bearer of a disposition of a certain sort A fiat object part of an organism which serves as the bearer of a disposition of a certain port. It is real, but it may have no determinate boundaries ==Independent Continuant== A thing (material entity) is an independent continuant (see https://artint.info/html/ArtInt_318.html) It can be a material entity or an immaterial entity (e.g., a spatial region) A site is a shape that is defined by some other continuants, such as a hole in a donut. An object aggregate consists of other objects (e.g., a flock of sheep or a pile of sand) An object is a self-connected (?) entity that maintains its identity through time, even if it gains or loses parts. Common objects are cups, people, emails, or the knowledge of how to tie shoelaces. An object is a self-connect (?) entity that maintains its identity through time, even if it gains or loses parts. A fit part of an object is part of an object that does not have clear boundaries, such as the dangerous part of a city, or the secluded part of a beach. The boundary of an object is a lower-dimensional part of some continuant, for example the surface of the Earth, or a cell boundary. Spatial regions are parts of space that do not depend on other objects to give them identity. They remain static, as opposed to sites and boundaries that move with the objects that define them. GDC = Generically dependent continuants Copyable These can migrate or can be identically copied from one independent continuant entity to another. SDC = Specifically dependent continuants These are qualities. They cannot migrate. Examples: capabilities, emotions, functions, motivations. Examples: color, height, mass, weight =OCCURRENT= [SPAN: SPANning time] An occurrent is a process or event. It does not exist in a given moment apart from other moments. Instead, it unfolds over time ("perdures") and has temporal (and possibly also spatial) parts. Events are depenent on bearers/participants Continuants and their corresponding occurrents: plan => execution function => expression role => exercise disposition => realization capability => application tendency => course A processual entity: A process is something that happens over time and has distinct ends, such as a life, a holiday, or a diagnostic session. A process aggregate is a collection of processes such as the playing of the individuals in a band, or the flying of a set of planes in a day. A fiat part of a process is part of a process having no distinct ends, such as the most interesting part of a holiday, or the most serious part of an operation. A processual context is the setting for some other occurrent, for example, relaxation as the setting for rejuvenation, or a surgery as a setting for an infection. A boundary of a process is the instantaneous temporal boundary of a process, such as when a robot starts to clean up the lab, or a birth. =The Ship of Theseus= We understand and accept that objects exist over time. Objects that change and unfold over time are known in Philosophy as "independent continuants". They continue to exist across time. The notion of an continuant comes with an implicit and subjective resiliance of identity. If we take a toy house made of toothpicks and replace all the toothpicks one by one, many would agree that the end result is the same house, despite not sharing any toothpicks with the original version. However, if the toy house is moved as a whole to a new location and a replacement is erected in its old location, then most would agree that the new house is a distinct entity from the original. The same can be said of the Ship of Theseus. It is a continuant, and so it endures in the face of changes, as long as those changes are gradual enough to fall within conventional limits of the persistence of identity. (In ontological terms, the exact degree of resiliance of identity can be thought of as a fiat part of an object modification process.)
  12. The verb/keyword "a" can be used as a predicate in a triple as an alternative for the IRI  http://www.w3.org/1999/02/22-rdf-syntax-ns#type, which is often written as rdf:type.
  13. See lists of ontologies at http://prefix.cc/popular/all.ttl http://vocab.org http://info.slis.indiana.edu/~dingying/Teaching/S604/OntologyList.html
  14. Standard SQL: https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax A couple decks on Graphs & Machine Learning by Tiago Peixoto: Statistical inference of generative network models, 2016 Statistical inference of network structure, 2017