SlideShare a Scribd company logo
Graph Analysis over Relational Database. Roberto Franchini - Arcade Analytics
Graph Analysis over
Relational Database
Roberto Franchini, CTO
@robfrankie
Gabriele Ponzi, Senior Developer
@gponzi
R.Franchini> whoami
CTO (hands on) of Arcade Analytics
20 years of experience
OrientDB (Tech lead): JDBC driver, full-text and spatial indexes,
docker images, evangelism
CELI (Tech lead): NLP (@scale) and semantic search for the market
leader in social media monitoring
JUG leader, tech speaker
G.Ponzi> whoami
Senior developer at Arcade Analytics
MSc in Computer Science
Academic and work experience in Databases, Big Data and NoSQL
world, distributed data handling, information extraction and
visualisation
Passionate developer always been in love with cutting edge
technologies
Agenda
From relational to graph
Intro to graph model
ER model and similarities
ER to graph
To flat or not to flat relations
Demo
Goal: RDBMS as a graph
turn upside down your plain old RDBMS
explore relations as a graph
Why?
Joins are hard to write
Joins are for developers
Graph model is just the plain old normalized ER-model
Visual navigation is for human beings
Import into a graph database
Write custom process to export from RDBMS and import into a graph
Neo4j and OrientDB can import from CSVs
OrientDB has Teleporter (live sync only in EE version)
Import into a graph database
Hard to keep in sync
work on OLD data
Time consuming
should wait for sync or import
Cost $$$ on maintenance
Data migration problems
Costs
Graph crash course
Graph
G = (V,E)
Graph: reference model
Property Graph Model
● Vertices
○ set of outgoing edges
○ set of incoming edges
○ collection of properties (key-value map)
● Edges
○ outgoing tail vertex
○ incoming head vertex
○ label that denotes the type of relationship
between its two vertices
○ collection of properties (key-value map)
Graph model crash course
Model pairwise relations between objects
Objects: “Nodes”, “Vertices”
Relations: “Edges”, “Arcs”, “Links”
Nodes (Vertices)
Objects in the graph, related by edges
Can contain information
Edges
Can be directed or undirected
Can store information, usually in the form of an edge “weight”
Use cases
Social media analysis
Forensic analysis
Recommendation
More theory
Special graphs
Regular graph: Each node has the same number of neighbours
Complete graph: Every pair of nodes is joined by an edge; every
possible edge exists
Connected graph: Always possible to move from a to b for any {a,b}
Strongly connected graph: Directed path from a to b exists for all {a,b}
Bipartite graph: Can separate vertices into two groups such that edges
only cross between the groups
Cycles and trees
Cycle: a path that leads you back where you started
Some graphs contain cycles, others do not
Cycle-free graphs are called “acyclic”
Tree: connected graph with no cycles
Algorithms
Shortest Path
Dijkstra
Centrality
Page rank
Modularity
Clustering, then max degree, min degree, average degree
Model translation
RDBMS Connector
How to perform a Graph Analysis over a data source
with a different data model?
RDBMS Connector
How to perform a Graph Analysis over a data source
with a different data model?
RDBMS Connector: General Workflow
RDBMS Connector: General Workflow
RDBMS Connector: General Workflow
RDBMS Connector: General Workflow
RDBMS Connector: General Workflow
Mapping strategies
Graph Model allows us to perform several optimisations
through the aggregation of some info.
Mapping strategies
Arcade provides two different strategies, each with a specific impact
on the mapping between the two domains:
naive strategy
naive-aggregate strategy
Mapping: naive strategy
Basic approach: E-R Model directly translated into a coherent Graph Model as
follows:
● Entity Vertex Type
● Relationship Edge Type
Pros:
● Fast
● Few mapping rules needed
Cons:
● Model overheads
Mapping: naive strategy
Naive strategy overhead
Mapping: naive aggregate strategy
Basic approach + aggregation: N-N Relationships are aggregated
● Entity Vertex Type
● Relationship Edge Type
● Join Table Aggregator Edge
Pros:
● Overhead decreasing
● Resulting graph is less complex, then analysis in simpler!
● Better performances
Cons:
● More mapping rules needed
Mapping: naive aggregate strategy
Strategies comparison
Strategies comparison
Naive strategy output Naive aggregate strategy output
Other useful model alterations
Aggregation of 1 or more
tables into a single Vertex
Type
Other useful model alterations
Aggregation of 1 or more
tables into a single Vertex
Type
Single table splitting into
multiple Vertex TypesOR
Other useful model alterations
Aggregation of 1 or more
tables into a single Vertex
Type
Single table splitting into
multiple Vertex TypesOR
Aggregation of 1 or more
Relationships into a single
Edge Type
Single Relationship splitting
into multiple Edge TypesOR
Other useful model alterations
Aggregation of 1 or more
tables into a single Vertex
Type
Single table splitting into
multiple Vertex TypesOR
Aggregation of 1 or more
Relationships into a single
Edge Type
Single Relationship splitting
into multiple Edge TypesOR
New Vertex or Edge Type definition could be useful too
Demo use case: DVD Rental
E-R Model
Demo use case: DVD Rental
Graph Model
(without aggregation)
Demo use case: DVD Rental
Graph Model
(without aggregation)
Demo time
Thanks for your attention!
Contact US
https://arcadeanalytics.com/
info@arcadeanalytics.com
+1 844-491-6161

More Related Content

PPTX
Graph analysis over relational database
PDF
Graph analytic and machine learning
PDF
Bi g data_urban modeling_applications_23092013
PPTX
Vector data model
PDF
Creating graphs -_key_points
PDF
Analysis of Webspaces of the Siberian Branch of the Russian Academy of Scienc...
PDF
Graph Data Modeling in Four Dimensions – Outline, Differences, Artisanship, A...
PDF
En un mundo hiperconectado, las bases de datos de grafos son tu arma secreta
Graph analysis over relational database
Graph analytic and machine learning
Bi g data_urban modeling_applications_23092013
Vector data model
Creating graphs -_key_points
Analysis of Webspaces of the Siberian Branch of the Russian Academy of Scienc...
Graph Data Modeling in Four Dimensions – Outline, Differences, Artisanship, A...
En un mundo hiperconectado, las bases de datos de grafos son tu arma secreta

Similar to Graph Analysis over Relational Database. Roberto Franchini - Arcade Analytics (20)

PDF
Using A Distributed Graph Database To Make Sense Of Disparate Data Stores
PDF
Advanced Analytics: Graph Database Use Cases
PDF
How Graph Databases used in Police Department?
PPTX
Using Graph Analysis and Fraud Detection in the Fintech Industry
PPTX
Using Graph Analysis and Fraud Detection in the Fintech Industry
PDF
Leverage graph technologies to discover hidden insights in your EHS & Sustain...
PPTX
Graph Analytics
PPTX
Follow the money with graphs
PDF
Data Modeling with Neo4j
PDF
Graphing Grifters: Identify & Display Patterns of Corruption With Oracle Graph
PDF
Connecting the Dots—How a Graph Database Enables Discovery
PDF
Graph Gurus 23: Best Practices To Model Your Data Using A Graph Database
PDF
Distributed graph processing
PDF
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
PPTX
Large Scale Graph Analytics with JanusGraph
PPTX
Large Scale Graph Analytics with JanusGraph
PPTX
Graph Based Machine Learning on Relational Data
PPTX
Graph databse.pptx
PDF
The Graph Abstract Data Type-DATA STRUCTURE.pdf
PPT
10. Graph Databases
Using A Distributed Graph Database To Make Sense Of Disparate Data Stores
Advanced Analytics: Graph Database Use Cases
How Graph Databases used in Police Department?
Using Graph Analysis and Fraud Detection in the Fintech Industry
Using Graph Analysis and Fraud Detection in the Fintech Industry
Leverage graph technologies to discover hidden insights in your EHS & Sustain...
Graph Analytics
Follow the money with graphs
Data Modeling with Neo4j
Graphing Grifters: Identify & Display Patterns of Corruption With Oracle Graph
Connecting the Dots—How a Graph Database Enables Discovery
Graph Gurus 23: Best Practices To Model Your Data Using A Graph Database
Distributed graph processing
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
Large Scale Graph Analytics with JanusGraph
Large Scale Graph Analytics with JanusGraph
Graph Based Machine Learning on Relational Data
Graph databse.pptx
The Graph Abstract Data Type-DATA STRUCTURE.pdf
10. Graph Databases
Ad

More from Data Driven Innovation (20)

PDF
Integrazione della mobilità elettrica nei sistemi urbani (Stefano Carrese, Un...
PDF
La statistica ufficiale e i trasporti marittimi nell'era dei big data (Vincen...
PDF
How can we realize the Mobility as a Service (Maas) (Andrea Paletti, London S...
PDF
Il DTC-Lazio e i dati del patrimonio culturale (Maria Prezioso, Università To...
PDF
CHNet-DHLab: Servizi Cloud a supporto dei beni culturali (Fabio Proietti, INF...
PDF
Progetto EOSC-Pillar (Fulvio Galeazzi, GARR)
PDF
Una infrastruttura per l’accesso al patrimonio culturale: il Progetto del Por...
PDF
Utilizzo dei Big data per l’analisi dei flussi veicolari e della mobilità (Ma...
PDF
I dati personali nell'analisi comportamentale della mobilità di dipendenti e ...
PDF
Estrarre valore dai dati: tecnologie per ottimizzare la mobilità del futuro (...
PPTX
Le piattaforme dati per la mobilità nelle città italiane (Marco Mena, EY)
PDF
WiseTown, un ecosistema di applicazioni e strumenti per migliorare la qualità...
PDF
CityOpenSource as a civic tech tool (Ilaria Vitellio, CityOpenSource)
PDF
Big Data Confederation: toward the local urban data market place (Renzo Taffa...
PDF
Making citizens the eyes of policy makers: a sweet spot for hybrid AI? (Danie...
PDF
Dall'Agenda Digitale alla Smart City: il percorso di Roma Capitale verso il D...
PDF
Reusing open data: how to make a difference (Vittorio Scarano, Università di ...
PDF
Gestire i beni culturali con i big data (Sandro Stancampiano, Istat)
PDF
Data Governance: cos’è e perché è importante? (Elena Arista, Erwin)
PDF
Data driven economy: bastano i dati per avviare una start up? (Gabriele Anton...
Integrazione della mobilità elettrica nei sistemi urbani (Stefano Carrese, Un...
La statistica ufficiale e i trasporti marittimi nell'era dei big data (Vincen...
How can we realize the Mobility as a Service (Maas) (Andrea Paletti, London S...
Il DTC-Lazio e i dati del patrimonio culturale (Maria Prezioso, Università To...
CHNet-DHLab: Servizi Cloud a supporto dei beni culturali (Fabio Proietti, INF...
Progetto EOSC-Pillar (Fulvio Galeazzi, GARR)
Una infrastruttura per l’accesso al patrimonio culturale: il Progetto del Por...
Utilizzo dei Big data per l’analisi dei flussi veicolari e della mobilità (Ma...
I dati personali nell'analisi comportamentale della mobilità di dipendenti e ...
Estrarre valore dai dati: tecnologie per ottimizzare la mobilità del futuro (...
Le piattaforme dati per la mobilità nelle città italiane (Marco Mena, EY)
WiseTown, un ecosistema di applicazioni e strumenti per migliorare la qualità...
CityOpenSource as a civic tech tool (Ilaria Vitellio, CityOpenSource)
Big Data Confederation: toward the local urban data market place (Renzo Taffa...
Making citizens the eyes of policy makers: a sweet spot for hybrid AI? (Danie...
Dall'Agenda Digitale alla Smart City: il percorso di Roma Capitale verso il D...
Reusing open data: how to make a difference (Vittorio Scarano, Università di ...
Gestire i beni culturali con i big data (Sandro Stancampiano, Istat)
Data Governance: cos’è e perché è importante? (Elena Arista, Erwin)
Data driven economy: bastano i dati per avviare una start up? (Gabriele Anton...
Ad

Recently uploaded (20)

PDF
Lecture1 pattern recognition............
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
Introduction to machine learning and Linear Models
PPTX
Database Infoormation System (DBIS).pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PDF
Mega Projects Data Mega Projects Data
PDF
annual-report-2024-2025 original latest.
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
1_Introduction to advance data techniques.pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Lecture1 pattern recognition............
Business Ppt On Nestle.pptx huunnnhhgfvu
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Galatica Smart Energy Infrastructure Startup Pitch Deck
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Introduction-to-Cloud-ComputingFinal.pptx
Fluorescence-microscope_Botany_detailed content
Introduction to machine learning and Linear Models
Database Infoormation System (DBIS).pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Mega Projects Data Mega Projects Data
annual-report-2024-2025 original latest.
Data_Analytics_and_PowerBI_Presentation.pptx
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
1_Introduction to advance data techniques.pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf

Graph Analysis over Relational Database. Roberto Franchini - Arcade Analytics