graph databases , why, when and how ?
TRANSCRIPT
@alaa_mahmoud
@alaa_mahmoud - [email protected]
Alaa Abou Mahmoud
IBM Graph Dev - Master Inventor
Intro to Graph
Why, When & How?
@alaa_mahmoud
Graph Databases are the fastest Growing DB Engine
https://medium.com/@dmontag/technology-brief-neo4j-mongodb-rdbms-8ab48bec799#.995993k8c
@alaa_mahmoud
Bob AliceFriends With
id Name Age Location
1 Bob 32 Boston
2 Alice 21 San Diego
User 1 User 2
1 2
id Post
1 Graphs are cool!
User Post
1 1
2 1
Graphs are cool
Users
Users PostsPosts
Friends
Bob Alice
Friends With
Graphs
are cool
Social Network
@alaa_mahmoud
The paper written by Leonhard
Euler on the Seven Bridges of
Königsberg and published in 1736
is regarded as the first paper in the
history of graph theory.
History
@alaa_mahmoud
Node Node
Edge
Node
Graphs
A graph is a representation
of a set of nodes where
some pairs of nodes are
connected by edges.
@alaa_mahmoud
Node Node
Edge
Node
Property Graphs
Property 1
Property 2
Property 3Property 1
Property 2
Property 4
Property 5
Property 6
Property 1
Property 2
Property 8
Property 4
Property 5
Property 6
Property 4
Property 6
@alaa_mahmoud
You only use Graph Databases with Social Networks!
Myth
@alaa_mahmoud
THIS IS A GRAPH!
@alaa_mahmoud
Bob
Graph
Team
Visualizatio
n
Group
ERB
Team
Analytics
Departme
nt Team
Outing
“Intro to
Graph”
Document
Server A
Works at
Part of
Leads Logged to
Creates
Organizes
Alice
QA
Team
Toast
Masters
Part Of
Part of
Leads
Logged to
Manages
Edits
Works at
Manager Of
And this one as well
@alaa_mahmoud
Three visualizations which
combine representations of
population, movement, and
disease spread at a local
scale that is consistent with
a zoomable global scale.This
work provides mid-level
abstractions that expert
epidemiologists can use for
insights into contagion.
VoroGraph: Visualization Tools for Epidemic Analysis
@alaa_mahmoud
Diagnosing psychosis with word analysis
@alaa_mahmoud
@alaa_mahmoud
Recommendation engines
Anomaly/Fraud Detection
Network Analysis/Route planning
Social Networks
Identity/Access Management
Graph-based search
Master Data Management
Graph is the ‘Natural’ way to represent and query complex connected data
@alaa_mahmoud
Car
Alask
a
Fred
Chip
s
Bosto
n
Jane
Sals
a
Soda
NYC
John
Sold in
Bought
Bought
Bought
Bought
Bought
Lives in
Lives in
Knows
Knows
Made in
Recommendations
Suggest to Fred
that he might like
some salsa or
some Soda
@alaa_mahmoud
Car
Alask
a
Fred
Chip
s
Bosto
n
Jane
Sals
a
Soda
NYC
John
Sold in
Bought
Bought
Bought
Bought
Bought
Lives in
Lives in
Knows
Knows
Made in
Recommendations
Suggest to John
that he might know
Jane
@alaa_mahmoud
Car
Alask
a
Fred
Chip
s
Bosto
n
Jane
Sals
a
Soda
NYC
John
Sold in
Bought
Bought
Bought
Bought
Bought
Lives in
Lives in
Knows
Knows
Made in
Recommendations : Shortest Path
Tell John that he knows
Jane through Fred
(Finding the shortest
path)
@alaa_mahmoud
Patien
t E
Alask
a
Dr A
Patien
t D
Bosto
n
Dr B
Patien
t B
Patien
t A
NYC
Patien
t F
Lives in
Files Claim
Files Claim
Files Claim
Files a Claim
Files a Claim
Lives in
Lives in
Files Claim
Knows
Lives
Fraud Detection
Why would a Dr that
lives in Boston be filing
claims against patients
in Alaska and CA?
Lives in
CALives in
Lives in
@alaa_mahmoud
How?
@alaa_mahmoud
@alaa_mahmoud
Apache TinkerPop™ is a graph
computing framework for both graph
databases (OLTP) and graph analytic
systems (OLAP).
@alaa_mahmoud
+
Graph Traversal
Graph Computing
(Gremlin)
@alaa_mahmoud
graph.traversal().V().has('name','Alaa').out('posts').values('comment')
Gremlin is a graph traversal language and virtual machine developed by Apache TinkerPop of the Apache Software Foundation.
Gremlin is based on Groovy and uses the same syntax.
Find all the comments that Alaa posted
Let’s see Graph in action
Sign up for Bluemix
http://bluemix.net
A Hybrid Cloud Development Platform To Build &
Run Your Apps. Try Now!
Build And Run Apps · Extend App Functionality ·
Optimize App Performance.
Extend your apps with Analytics and Data Services.
@alaa_mahmoud
IBM Graph