SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Two graph data models
RDF and Property Graphs
Andy Seaborne
Paolo Castagna
andy@a.o, castagna@a.o
Introduction
This talk is about two graph data models
(RDF and Property Graphs), example of a
couple of Apache projects using such data
models, and a few lessons learned along the
way.
Graph Data Models
➢ RDF
● W3C Standard
➢ Property Graphs
● Industry standard
RDF
➢ IRIs (=URIs), literals (strings, numbers, …),
blank nodes
➢ Triple => subject-predicate-object
● Predicate (or property) is the link name : an IRI
➢ Graph => set of triples
prefix : <http://example/myData/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
# foaf:name is a short form of <http://xmlns.com/foaf/0.1/name>
:alice rdf:type foaf:Person ;
foaf:name "Alice Smith" ; # ; means “same subject”
foaf:knows :bob .
:alice
foaf:knows
"Alice Smith"
foaf:name
foaf:Person
rdf:type
:bob
prefix : <http://example/myData/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
:bob rdf:type foaf:Person ;
foaf:name "Bob Brown" .
"Bob Brown"
foaf:Person
rdf:type
:bob
prefix : <http://example/myData/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
:alice rdf:type foaf:Person ;
foaf:name "Alice Smith" ;
foaf:knows :bob .
:bob rdf:type foaf:Person ;
foaf:name "Bob Brown" .
:alice
foaf:knows
"Alice Smith"
foaf:name
foaf:Person
rdf:type
"Bob Brown"
foaf:Person
rdf:type
:bob
RDFS
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
foaf:Person rdfs:subClassOf foaf:Agent .
foaf:Person rdfs:subClassOf
<http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> .
foaf:skypeID
rdfs:domain foaf:Agent ;
rdfs:label "Skype ID" ;
rdfs:range rdfs:Literal ;
rdfs:subPropertyOf foaf:nick .
RDF : Access
➢ SPARQL : Query language
➢ Protocol : over HTTP
PREFIX : <http://example/myData/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
## Names of people Alice knows.
SELECT * {
:alice foaf:knows ?X .
?X foaf:name ?name .
}
RDF : Access
➢ SPARQL : Query language
➢ Protocol : over HTTP
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?numFriends {
{ SELECT ?person (count(*) AS ?numFriends) {
?person foaf:knows ?X .
} GROUP BY ?person
}
?person foaf:name ?name .
} ORDER BY ?numFriends
RDF : Access
➢ SPARQL : Update language
➢ Protocol : over HTTP
PREFIX : <http://example/myData/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA {
:bob foaf:name "Bob Brown" ;
foaf:knows :alice
} ;
INSERT { :alice knows ?B }
} WHERE {
:bob knows ?B
}
Apache Jena
TLP: April 2012
➢ Involvement in standards
➢ RDF 1.1, SPARQL 1.1
➢ RDF database
➢ SPARQL server
Other RDF@ASF:
➢ Any23, Marmotta, Clerezza, Stanbol, Rya
Property Graph Data Model
A property graph is a set of vertexes and edges with
respective properties (i.e. key / values):
➢ each vertex or edge has a unique identifier
➢ each vertex has a set of outgoing edges and a set of incoming edges
➢ edges are directed: each edge has a start vertex and an end vertex
➢ each edge has a label which denotes the type of relationship
➢ vertexes and edges can have a properties (i.e. key / value pairs)
Directed multigraph with properties
attached to vertexes and edges
Property Graph: Example
id = 1 id = 2
name = “Alice”
surname = “Smith”
age = 32
email = alice@example.com
...
name = “Bob”
surname = “Brown”
age = 45
email = bob@example.com
...
since = 01/01/1970
...
id = 3
knows
Apache Spark: GraphX*
// Creating a Graph
val vertexes: RDD[(VertexId, (String, String))] =
sc.parallelize (Array((1L,("Alice", "alice@example.com")), (2L,("Bob", "bob@example.com"))))
val edges: RDD[Edge[String]] =
sc.parallelize(Array(Edge(1L, 2L, "knows"))
val graph = Graph(vertexes, edges)
...
Example of parallel graph algorithms available:
// Find the triangle count for each vertex
val triCounts = graph.triangleCount().vertices
// Find the connected components
val cc = graph.connectedComponents().vertices
// Run PageRank
val ranks = graph.pageRank(0.0001).vertices
* GraphX is in the alpha stage
Property Graphs @ASF
➢ Apache Tinkerpop (incubating)
➢ Apache Spark > GraphX
➢ Apache Giraph
➢ Apache Flink > Gelly
Use Case for Graphs
➢ Analytics
● Social networks and recommendation engines
● Data center infrastructure management
➢ Knowledge Graphs
● Happenings: people, places, events
● Customer databases / products catalogues
Some Conclusions
➢ Data Graphs are (still) new to many people
➢ RDF emphasizes information modelling
→ Knowledge graphs
→ SQL-like query
➢ Property Graph emphasizes data processing
→ Data capture
→ Graph analytic algorithms
➢ Naive layering of data models leads dissatisfaction
→ Can only mix toolsets by knowing it’s layered
➢ Could share technology
→ Storage, data access, query algebra
Thanks and Q&A
?

Contenu connexe

Tendances

SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
andyseaborne
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 

Tendances (20)

Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five Slides
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data Mud
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applications
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
SWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQLSWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQL
 
SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
RDF validation tutorial
RDF validation tutorialRDF validation tutorial
RDF validation tutorial
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
Rdf Overview Presentation
Rdf Overview PresentationRdf Overview Presentation
Rdf Overview Presentation
 
An Introduction to SPARQL
An Introduction to SPARQLAn Introduction to SPARQL
An Introduction to SPARQL
 
SPARQL in a nutshell
SPARQL in a nutshellSPARQL in a nutshell
SPARQL in a nutshell
 
SPARQL Tutorial
SPARQL TutorialSPARQL Tutorial
SPARQL Tutorial
 
From SQL to SPARQL
From SQL to SPARQLFrom SQL to SPARQL
From SQL to SPARQL
 
Jesús Barrasa
Jesús BarrasaJesús Barrasa
Jesús Barrasa
 

Similaire à Two graph data models : RDF and Property Graphs

An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked Data
Gabriela Agustini
 
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
Fabien Gandon
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
Gabriela Agustini
 

Similaire à Two graph data models : RDF and Property Graphs (20)

2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked Data
 
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked Data
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQL
 
Mapping Relational Databases to Linked Data
Mapping Relational Databases to Linked DataMapping Relational Databases to Linked Data
Mapping Relational Databases to Linked Data
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
 
HyperGraphQL
HyperGraphQLHyperGraphQL
HyperGraphQL
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
Sparql
SparqlSparql
Sparql
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Stores
 
RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
An Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of DataAn Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of Data
 
SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Two graph data models : RDF and Property Graphs

  • 1. Two graph data models RDF and Property Graphs Andy Seaborne Paolo Castagna andy@a.o, castagna@a.o
  • 2. Introduction This talk is about two graph data models (RDF and Property Graphs), example of a couple of Apache projects using such data models, and a few lessons learned along the way.
  • 3. Graph Data Models ➢ RDF ● W3C Standard ➢ Property Graphs ● Industry standard
  • 4. RDF ➢ IRIs (=URIs), literals (strings, numbers, …), blank nodes ➢ Triple => subject-predicate-object ● Predicate (or property) is the link name : an IRI ➢ Graph => set of triples
  • 5. prefix : <http://example/myData/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix foaf: <http://xmlns.com/foaf/0.1/> # foaf:name is a short form of <http://xmlns.com/foaf/0.1/name> :alice rdf:type foaf:Person ; foaf:name "Alice Smith" ; # ; means “same subject” foaf:knows :bob . :alice foaf:knows "Alice Smith" foaf:name foaf:Person rdf:type :bob
  • 6. prefix : <http://example/myData/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix foaf: <http://xmlns.com/foaf/0.1/> :bob rdf:type foaf:Person ; foaf:name "Bob Brown" . "Bob Brown" foaf:Person rdf:type :bob
  • 7. prefix : <http://example/myData/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix foaf: <http://xmlns.com/foaf/0.1/> :alice rdf:type foaf:Person ; foaf:name "Alice Smith" ; foaf:knows :bob . :bob rdf:type foaf:Person ; foaf:name "Bob Brown" . :alice foaf:knows "Alice Smith" foaf:name foaf:Person rdf:type "Bob Brown" foaf:Person rdf:type :bob
  • 8. RDFS prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix foaf: <http://xmlns.com/foaf/0.1/> foaf:Person rdfs:subClassOf foaf:Agent . foaf:Person rdfs:subClassOf <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> . foaf:skypeID rdfs:domain foaf:Agent ; rdfs:label "Skype ID" ; rdfs:range rdfs:Literal ; rdfs:subPropertyOf foaf:nick .
  • 9. RDF : Access ➢ SPARQL : Query language ➢ Protocol : over HTTP PREFIX : <http://example/myData/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> ## Names of people Alice knows. SELECT * { :alice foaf:knows ?X . ?X foaf:name ?name . }
  • 10. RDF : Access ➢ SPARQL : Query language ➢ Protocol : over HTTP PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?numFriends { { SELECT ?person (count(*) AS ?numFriends) { ?person foaf:knows ?X . } GROUP BY ?person } ?person foaf:name ?name . } ORDER BY ?numFriends
  • 11. RDF : Access ➢ SPARQL : Update language ➢ Protocol : over HTTP PREFIX : <http://example/myData/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> INSERT DATA { :bob foaf:name "Bob Brown" ; foaf:knows :alice } ; INSERT { :alice knows ?B } } WHERE { :bob knows ?B }
  • 12. Apache Jena TLP: April 2012 ➢ Involvement in standards ➢ RDF 1.1, SPARQL 1.1 ➢ RDF database ➢ SPARQL server Other RDF@ASF: ➢ Any23, Marmotta, Clerezza, Stanbol, Rya
  • 13. Property Graph Data Model A property graph is a set of vertexes and edges with respective properties (i.e. key / values): ➢ each vertex or edge has a unique identifier ➢ each vertex has a set of outgoing edges and a set of incoming edges ➢ edges are directed: each edge has a start vertex and an end vertex ➢ each edge has a label which denotes the type of relationship ➢ vertexes and edges can have a properties (i.e. key / value pairs) Directed multigraph with properties attached to vertexes and edges
  • 14. Property Graph: Example id = 1 id = 2 name = “Alice” surname = “Smith” age = 32 email = alice@example.com ... name = “Bob” surname = “Brown” age = 45 email = bob@example.com ... since = 01/01/1970 ... id = 3 knows
  • 15. Apache Spark: GraphX* // Creating a Graph val vertexes: RDD[(VertexId, (String, String))] = sc.parallelize (Array((1L,("Alice", "alice@example.com")), (2L,("Bob", "bob@example.com")))) val edges: RDD[Edge[String]] = sc.parallelize(Array(Edge(1L, 2L, "knows")) val graph = Graph(vertexes, edges) ... Example of parallel graph algorithms available: // Find the triangle count for each vertex val triCounts = graph.triangleCount().vertices // Find the connected components val cc = graph.connectedComponents().vertices // Run PageRank val ranks = graph.pageRank(0.0001).vertices * GraphX is in the alpha stage
  • 16. Property Graphs @ASF ➢ Apache Tinkerpop (incubating) ➢ Apache Spark > GraphX ➢ Apache Giraph ➢ Apache Flink > Gelly
  • 17. Use Case for Graphs ➢ Analytics ● Social networks and recommendation engines ● Data center infrastructure management ➢ Knowledge Graphs ● Happenings: people, places, events ● Customer databases / products catalogues
  • 18. Some Conclusions ➢ Data Graphs are (still) new to many people ➢ RDF emphasizes information modelling → Knowledge graphs → SQL-like query ➢ Property Graph emphasizes data processing → Data capture → Graph analytic algorithms ➢ Naive layering of data models leads dissatisfaction → Can only mix toolsets by knowing it’s layered ➢ Could share technology → Storage, data access, query algebra