SlideShare a Scribd company logo
1 of 57
Neo Technology, Inc Confidential
Emil Eifrem
emil@neotechnology.com
@emileifrem
#neo4j
Graph All Teh Things!!!11
An Introduction to Graph Databases and Neo4j
SiliconValley JUG, 2014
Thursday, April 17, 14
Neo Technology, Inc Confidential
Agenda
• Graphs Are Eating The World
• Wait! What Is A Graph Anyway?
• Use Cases
Thursday, April 17, 14
Neo Technology, Inc Confidential
WARNING!
ALL I’M OFFERING IS THE TRUTH
Thursday, April 17, 14
Neo Technology, Inc Confidential
Victims
Thursday, April 17, 14
Neo Technology, Inc Confidential
Victims
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating
The World
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating The World
Thursday, April 17, 14
Neo Technology, Inc Confidential
“Graph analysis is the true killer app for Big Data.”
Graphs Are Eating The World
http://blogs.forrester.com/james_kobielus/11-12-19-the_year_ahead_in_big_data_big_cool_new_stuff_looms_large
Thursday, April 17, 14
Neo Technology, Inc Confidential
“[I]t is arguable that graph databases will have a
bigger impact on the database landscape than
Hadoop or its competitors.”
http://www.bloorresearch.com/blog/IM-Blog/2012/5/graph-databases-nosql.html
Graphs Are Eating The World
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating The World
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating The World
http://www.asterdata.com/resources/video-discovery-platform.phpttp://www.zdnet.com/teradata-aster-gets-graph-database-hdfs-compatible-file-store-7000021667/
Thursday, April 17, 14
Neo Technology, Inc Confidential
http://www.forrester.com/TechRadar+Enterprise+DBMS+Q1+2014/fulltext/-/E-RES106801
Graphs Are Eating The World
“Forrester estimates that over 25% of enterprises
will be using graph databases by 2017”
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating The World
*Source: http://db-engines.com/en/ranking
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs Are Eating The World
Finance
Accenture
Thursday, April 17, 14
Neo Technology, Inc Confidential
What Is A Graph,
Anyway?
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graphs!
Dancing With
Michael Jackson
Eating Brains
Thursday, April 17, 14
Neo Technology, Inc Confidential
Dancing With
Michael Jackson
Eating Brains
Not really.
These are Charts!
Thursday, April 17, 14
Neo Technology, Inc Confidential
Thursday, April 17, 14
Neo Technology, Inc Confidential
What Is “Graph Search,” Anyway?
Thursday, April 17, 14
Neo Technology, Inc Confidential
Cypher
LOVES
A B
Graph PatternsASCII art
MATCH (A) -[:LOVES]-> (B)
WHERE A.name = "A"
RETURN B
Thursday, April 17, 14
Neo Technology, Inc Confidential
MATCH (me:Person)-[:IS_FRIEND_OF]->(friend:Person),
(friend)-[:LIKES]->(restaurant),
(restaurant)-[:LOCATED_IN]->(newyork:City),
(restaurant)-[:SERVES]->(sushi:Cuisine)
WHERE me.name = 'Emil' AND newyork.location='New York' AND
sushi.cuisine='Sushi'
RETURN restaurant.name
http://maxdemarzi.com/?s=facebook
Thursday, April 17, 14
Neo Technology, Inc Confidential
Thursday, April 17, 14
“Find all direct reports and how many they manage, up to 3 levels down”
Example HR Query (using SQL)
Thursday, April 17, 14
*“Find all direct reports and how many they manage, up to 3 levels down”
(SELECT T.directReportees AS directReportees, sum(T.count) AS count
FROM (
SELECT manager.pid AS directReportees, 0 AS count
FROM person_reportee manager
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
UNION
SELECT manager.pid AS directReportees, count(manager.directly_manages) AS count
FROM person_reportee manager
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
UNION
SELECT manager.pid AS directReportees, count(reportee.directly_manages) AS count
FROM person_reportee manager
JOIN person_reportee reportee
ON manager.directly_manages = reportee.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
UNION
SELECT manager.pid AS directReportees, count(L2Reportees.directly_manages) AS count
FROM person_reportee manager
JOIN person_reportee L1Reportees
ON manager.directly_manages = L1Reportees.pid
JOIN person_reportee L2Reportees
ON L1Reportees.directly_manages = L2Reportees.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
) AS T
GROUP BY directReportees)
UNION
(SELECT T.directReportees AS directReportees, sum(T.count) AS count
FROM (
SELECT manager.directly_manages AS directReportees, 0 AS count
FROM person_reportee manager
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
UNION
SELECT reportee.pid AS directReportees, count(reportee.directly_manages) AS count
FROM person_reportee manager
JOIN person_reportee reportee
ON manager.directly_manages = reportee.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
UNION
(continued from previous page...)
SELECT depth1Reportees.pid AS directReportees,
count(depth2Reportees.directly_manages) AS count
FROM person_reportee manager
JOIN person_reportee L1Reportees
ON manager.directly_manages = L1Reportees.pid
JOIN person_reportee L2Reportees
ON L1Reportees.directly_manages = L2Reportees.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
) AS T
GROUP BY directReportees)
UNION
(SELECT T.directReportees AS directReportees, sum(T.count) AS count
FROM(
SELECT reportee.directly_manages AS directReportees, 0 AS count
FROM person_reportee manager
JOIN person_reportee reportee
ON manager.directly_manages = reportee.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
UNION
SELECT L2Reportees.pid AS directReportees, count(L2Reportees.directly_manages) AS
count
FROM person_reportee manager
JOIN person_reportee L1Reportees
ON manager.directly_manages = L1Reportees.pid
JOIN person_reportee L2Reportees
ON L1Reportees.directly_manages = L2Reportees.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
GROUP BY directReportees
) AS T
GROUP BY directReportees)
UNION
(SELECT L2Reportees.directly_manages AS directReportees, 0 AS count
FROM person_reportee manager
JOIN person_reportee L1Reportees
ON manager.directly_manages = L1Reportees.pid
JOIN person_reportee L2Reportees
ON L1Reportees.directly_manages = L2Reportees.pid
WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName")
)
Example HR Query (using SQL)
Thursday, April 17, 14
MATCH	
  (boss)-­‐[:MANAGES*0..3]-­‐>(sub),
	
  	
  	
  	
  	
  	
  (sub)-­‐[:MANAGES*1..3]-­‐>(report)
WHERE	
  boss.name	
  =	
  “John	
  Doe”
RETURN	
  sub.name	
  AS	
  Subordinate,	
  count(report)	
  AS	
  Total
Same Query in Cypher
*“Find all direct reports and how many they manage, up to 3 levels down”
Thursday, April 17, 14
Neo Technology, Inc Confidential
What About Performance?
Database # persons query time
MySQL
Neo4j
Neo4j
1,000
๏a sample social graph
•with ~1,000 persons
๏average 50 friends per person
๏pathExists(a,b) limited to depth 4
๏caches warmed up to eliminate disk I/O
Thursday, April 17, 14
Neo Technology, Inc Confidential
What About Performance?
Database # persons query time
MySQL
Neo4j
Neo4j
1,000 2,000 ms
๏a sample social graph
•with ~1,000 persons
๏average 50 friends per person
๏pathExists(a,b) limited to depth 4
๏caches warmed up to eliminate disk I/O
Thursday, April 17, 14
Neo Technology, Inc Confidential
Database # persons query time
MySQL
Neo4j
Neo4j
1,000 2,000 ms
1,000 2 ms
๏a sample social graph
•with ~1,000 persons
๏average 50 friends per person
๏pathExists(a,b) limited to depth 4
๏caches warmed up to eliminate disk I/O
What About Performance?
Thursday, April 17, 14
Neo Technology, Inc Confidential
Database # persons query time
MySQL
Neo4j
Neo4j
1,000 2,000 ms
1,000 2 ms
1,000,000
๏a sample social graph
•with ~1,000 persons
๏average 50 friends per person
๏pathExists(a,b) limited to depth 4
๏caches warmed up to eliminate disk I/O
What About Performance?
Thursday, April 17, 14
Neo Technology, Inc Confidential
Database # persons query time
MySQL
Neo4j
Neo4j
1,000 2,000 ms
1,000 2 ms
1,000,000 2 ms
๏a sample social graph
•with ~1,000 persons
๏average 50 friends per person
๏pathExists(a,b) limited to depth 4
๏caches warmed up to eliminate disk I/O
What About Performance?
Thursday, April 17, 14
Neo Technology, Inc Confidential
“Our	
  Neo4j	
  solution	
  is	
  literally	
  thousands	
  of	
  times	
  
faster	
  than	
  the	
  prior	
  MySQL	
  solution,
with	
  queries	
  that	
  require	
  10-­‐100	
  times	
  less	
  code.”
-­‐	
  Volker	
  Pacher,	
  Senior	
  Developer	
  eBay
What About Performance?
Thursday, April 17, 14
Real-Time/
OLTP
Offline/
Batch
Connected Data
Thursday, April 17, 14
Neo Technology, Inc Confidential
Use Cases
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Impact Analysis
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Management Example
(Network Graph)
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Management - Create
CREATE
! (crm {name:"CRM"}),
! (dbvm {name:"Database VM"}),
! (www {name:"Public Website"}),
! (wwwvm {name:"Webserver VM"}),
! (srv1 {name:"Server 1"}),
! (san {name:"SAN"}),
! (srv2 {name:"Server 2"}),
! (crm)-[:DEPENDS_ON]->(dbvm),
! (dbvm)-[:DEPENDS_ON]->(srv2),
! (srv2)-[:DEPENDS_ON]->(san),
! (www)-[:DEPENDS_ON]->(dbvm),
! (www)-[:DEPENDS_ON]->(wwwvm),
! (wwwvm)-[:DEPENDS_ON]->(srv1),
! (srv1)-[:DEPENDS_ON]->(san)
Practical Cypher
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Management - Impact Analysis
// Server 1 Outage
MATCH (n)<-[:DEPENDS_ON*]-(upstream)
WHERE n.name = "Server 1"
RETURN upstream
Practical Cypher
upstream
{name:"Webserver VM"}
{name:"Public Website"}
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Management - Dependency Analysis
// Public website dependencies
MATCH (n)-[:DEPENDS_ON*]->(downstream)
WHERE n.name = "Public Website"
RETURN downstream
Practical Cypher
downstream
{name:"Database VM"}
{name:"Server 2"}
{name:"SAN"}
{name:"Webserver VM"}
{name:"Server 1"}
Thursday, April 17, 14
Neo Technology, Inc Confidential
Network Management - Statistics
// Most depended on component
MATCH (n)<-[:DEPENDS_ON*]-(dependent)
RETURN n,
count(DISTINCT dependent)
AS dependents
ORDER BY dependents DESC
LIMIT 1
Practical Cypher
n dependents
{name:"SAN"} 6
Thursday, April 17, 14
Neo Technology, Inc Confidential
Route Finding
Thursday, April 17, 14
Neo Technology, Inc Confidential
Recommendations
Thursday, April 17, 14
Neo Technology, Inc Confidential
Logistics
Thursday, April 17, 14
Neo Technology, Inc Confidential
Access Control
Thursday, April 17, 14
Neo Technology, Inc Confidential
Fraud Detection
Thursday, April 17, 14
Neo Technology, Inc Confidential
Securities and Debt
Thursday, April 17, 14
Neo Technology, Inc Confidential
Basically: Graph All The Things!!!1
Thursday, April 17, 14
Gartner’s “5 Graphs”
Social Graph
Ref: http://www.gartner.com/id=2081316
Interest Graph
Payment Graph
Intent Graph
Mobile Graph
Thursday, April 17, 14
Neo Technology, Inc Confidential
• Network Graph
(e.g. Network Dependency Analysis, Network Inventory, etc.)
• Social Graph
(mobile apps, social recommendations, collaboration)
• Call Graph
(creating inferred social graph, churn reduction, etc.)
• Master Data Graph
(org & product hierarchy, data governance, IAM)
• Help Desk Graph
(enterprise collaboration)
5 Graphs of Telco
Thursday, April 17, 14
Neo Technology, Inc Confidential
• Payment Graph
(e.g. Fraud Detection, Credit Risk Analysis, Chargebacks...)
• Customer Graph
(org drillthru, product recommendations, mobile payments, etc.)
• Entitlement Graph
(identity & access management, authorization)
• Asset Graph
(portfolio analytics, risk management, market & sentiment
analysis, compliance)
• Master Data Graph
(enterprise collaboration, corporate hierarchy, data governance)
5 Graphs of Finance
Finance
Finance
Thursday, April 17, 14
Neo Technology, Inc Confidential
• Provider Graph
(e.g. referrals, patient management, research)
• Patient Graph
(support communities, doctor recommendations, clinical trials)
• Bioinformatic Graph
(drug research, genetic screening, bioengineering, etc.)
• Master Data Graph
(biological master data, evolutionary taxonomy,
the access control graph, etc.)
• Treatment Graph
(collaborative medicine, clinical trials, etc.)
5 Graphs of Health Care
Thursday, April 17, 14
Neo Technology, Inc Confidential
Graph Databases
The Definitive Book on Graph Databases
Available as a free PDF download at
graphdatabases.com!
Thursday, April 17, 14
Neo Technology, Inc Confidential
Brown
Bag
Lunch
By request only!
• you bring 10+ colleagues
• you provide a room with a projector + screen
• we bring a bag lunch
• we introduce Neo4j to your team
in 45 min + 15 min for Q&A
Schedule your Neo4j Intro now!
Thursday, April 17, 14
• The premier source for training on Graph
Databases and Neo4j
• Join us for the ‘All You Can Graph Day’ on May 9 in
Palo Alto!
• Sign up at graphacademy.com
Thursday, April 17, 14
• Wednesday, Oct. 22 - graphconnect.com
• Only conference focused on graphDBs
and applications powered by graphs
• Register now for $99 Alpha Geek Passes
GRAPHCONNECT
SF 2014
Thursday, April 17, 14
• 4/24 - GraphPUB Silicon Valley at Tied House
• 5/1 - Uncovering Invisible Relationships with
a GraphDB at Medium
• 5/6 - GraphPANEL Silicon Valley at AOL
• And more at: meetup.com/graphdb-sf
UPCOMING EVENTS
GRAPHPUB
NEO4J
20 14
Thursday, April 17, 14
Thursday, April 17, 14
Neo Technology, Inc Confidential
teh end (sic)
stay connected
Thursday, April 17, 14

More Related Content

Viewers also liked

Intro to Neo4j presentation
Intro to Neo4j presentationIntro to Neo4j presentation
Intro to Neo4j presentationjexp
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jNeo4j
 
GraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementGraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementNeo4j
 
Knowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeKnowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeNeo4j
 
Webinar: RDBMS to Graphs
Webinar: RDBMS to GraphsWebinar: RDBMS to Graphs
Webinar: RDBMS to GraphsNeo4j
 
An Overview of the Emerging Graph Landscape (Oct 2013)
An Overview of the Emerging Graph Landscape (Oct 2013)An Overview of the Emerging Graph Landscape (Oct 2013)
An Overview of the Emerging Graph Landscape (Oct 2013)Emil Eifrem
 
IT in Healthcare
IT in HealthcareIT in Healthcare
IT in HealthcareNetApp
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Emiland
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessJonathon Colman
 
Visualization of Publication Impact
Visualization of Publication ImpactVisualization of Publication Impact
Visualization of Publication ImpactEamonn Maguire
 
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudGraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudNeo4j
 
GraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionGraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionNeo4j
 
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...Neo4j
 
Webinar: Intro to Cypher
Webinar: Intro to CypherWebinar: Intro to Cypher
Webinar: Intro to CypherNeo4j
 
GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone Neo4j
 
Neo4j GraphTalks - Einführung in Graphdatenbanken
Neo4j GraphTalks - Einführung in GraphdatenbankenNeo4j GraphTalks - Einführung in Graphdatenbanken
Neo4j GraphTalks - Einführung in GraphdatenbankenNeo4j
 
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph Databases
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph DatabasesGraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph Databases
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph DatabasesNeo4j
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Neo4j
 

Viewers also liked (18)

Intro to Neo4j presentation
Intro to Neo4j presentationIntro to Neo4j presentation
Intro to Neo4j presentation
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4j
 
GraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementGraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access Management
 
Knowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeKnowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your Knowledge
 
Webinar: RDBMS to Graphs
Webinar: RDBMS to GraphsWebinar: RDBMS to Graphs
Webinar: RDBMS to Graphs
 
An Overview of the Emerging Graph Landscape (Oct 2013)
An Overview of the Emerging Graph Landscape (Oct 2013)An Overview of the Emerging Graph Landscape (Oct 2013)
An Overview of the Emerging Graph Landscape (Oct 2013)
 
IT in Healthcare
IT in HealthcareIT in Healthcare
IT in Healthcare
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for Success
 
Visualization of Publication Impact
Visualization of Publication ImpactVisualization of Publication Impact
Visualization of Publication Impact
 
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudGraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
 
GraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionGraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in Action
 
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
 
Webinar: Intro to Cypher
Webinar: Intro to CypherWebinar: Intro to Cypher
Webinar: Intro to Cypher
 
GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone
 
Neo4j GraphTalks - Einführung in Graphdatenbanken
Neo4j GraphTalks - Einführung in GraphdatenbankenNeo4j GraphTalks - Einführung in Graphdatenbanken
Neo4j GraphTalks - Einführung in Graphdatenbanken
 
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph Databases
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph DatabasesGraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph Databases
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph Databases
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...
 

More from Emil Eifrem

Startups in Sweden vs Startups in Silicon Valley, 2015 edition
Startups in Sweden vs Startups in Silicon Valley, 2015 editionStartups in Sweden vs Startups in Silicon Valley, 2015 edition
Startups in Sweden vs Startups in Silicon Valley, 2015 editionEmil Eifrem
 
GraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteGraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteEmil Eifrem
 
Startups in Sweden vs Startups in Silicon Valley
Startups in Sweden vs Startups in Silicon ValleyStartups in Sweden vs Startups in Silicon Valley
Startups in Sweden vs Startups in Silicon ValleyEmil Eifrem
 
An intro to Neo4j and some use cases (JFokus 2011)
An intro to Neo4j and some use cases (JFokus 2011)An intro to Neo4j and some use cases (JFokus 2011)
An intro to Neo4j and some use cases (JFokus 2011)Emil Eifrem
 
An overview of NOSQL (JFokus 2011)
An overview of NOSQL (JFokus 2011)An overview of NOSQL (JFokus 2011)
An overview of NOSQL (JFokus 2011)Emil Eifrem
 
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynoteNOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynoteEmil Eifrem
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)Emil Eifrem
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)Emil Eifrem
 
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)Emil Eifrem
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
 
Neo4j - The Benefits of Graph Databases (OSCON 2009)
Neo4j - The Benefits of Graph Databases (OSCON 2009)Neo4j - The Benefits of Graph Databases (OSCON 2009)
Neo4j - The Benefits of Graph Databases (OSCON 2009)Emil Eifrem
 
Neo4j -- or why graph dbs kick ass
Neo4j -- or why graph dbs kick assNeo4j -- or why graph dbs kick ass
Neo4j -- or why graph dbs kick assEmil Eifrem
 

More from Emil Eifrem (12)

Startups in Sweden vs Startups in Silicon Valley, 2015 edition
Startups in Sweden vs Startups in Silicon Valley, 2015 editionStartups in Sweden vs Startups in Silicon Valley, 2015 edition
Startups in Sweden vs Startups in Silicon Valley, 2015 edition
 
GraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteGraphConnect SF 2013 Keynote
GraphConnect SF 2013 Keynote
 
Startups in Sweden vs Startups in Silicon Valley
Startups in Sweden vs Startups in Silicon ValleyStartups in Sweden vs Startups in Silicon Valley
Startups in Sweden vs Startups in Silicon Valley
 
An intro to Neo4j and some use cases (JFokus 2011)
An intro to Neo4j and some use cases (JFokus 2011)An intro to Neo4j and some use cases (JFokus 2011)
An intro to Neo4j and some use cases (JFokus 2011)
 
An overview of NOSQL (JFokus 2011)
An overview of NOSQL (JFokus 2011)An overview of NOSQL (JFokus 2011)
An overview of NOSQL (JFokus 2011)
 
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynoteNOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynote
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
 
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)
NOSQL Overview Lightning Talk (Scalability Geekcruise 2009)
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
 
Neo4j - The Benefits of Graph Databases (OSCON 2009)
Neo4j - The Benefits of Graph Databases (OSCON 2009)Neo4j - The Benefits of Graph Databases (OSCON 2009)
Neo4j - The Benefits of Graph Databases (OSCON 2009)
 
Neo4j -- or why graph dbs kick ass
Neo4j -- or why graph dbs kick assNeo4j -- or why graph dbs kick ass
Neo4j -- or why graph dbs kick ass
 

Recently uploaded

Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachBoston Institute of Analytics
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...amitlee9823
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...amitlee9823
 

Recently uploaded (20)

Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 

Intro to Graph Databases and Neo4j (SV JUG Apr, 2014)

  • 1. Neo Technology, Inc Confidential Emil Eifrem emil@neotechnology.com @emileifrem #neo4j Graph All Teh Things!!!11 An Introduction to Graph Databases and Neo4j SiliconValley JUG, 2014 Thursday, April 17, 14
  • 2. Neo Technology, Inc Confidential Agenda • Graphs Are Eating The World • Wait! What Is A Graph Anyway? • Use Cases Thursday, April 17, 14
  • 3. Neo Technology, Inc Confidential WARNING! ALL I’M OFFERING IS THE TRUTH Thursday, April 17, 14
  • 4. Neo Technology, Inc Confidential Victims Thursday, April 17, 14
  • 5. Neo Technology, Inc Confidential Victims Thursday, April 17, 14
  • 6. Neo Technology, Inc Confidential Graphs Are Eating The World Thursday, April 17, 14
  • 7. Neo Technology, Inc Confidential Graphs Are Eating The World Thursday, April 17, 14
  • 8. Neo Technology, Inc Confidential “Graph analysis is the true killer app for Big Data.” Graphs Are Eating The World http://blogs.forrester.com/james_kobielus/11-12-19-the_year_ahead_in_big_data_big_cool_new_stuff_looms_large Thursday, April 17, 14
  • 9. Neo Technology, Inc Confidential “[I]t is arguable that graph databases will have a bigger impact on the database landscape than Hadoop or its competitors.” http://www.bloorresearch.com/blog/IM-Blog/2012/5/graph-databases-nosql.html Graphs Are Eating The World Thursday, April 17, 14
  • 10. Neo Technology, Inc Confidential Graphs Are Eating The World Thursday, April 17, 14
  • 11. Neo Technology, Inc Confidential Graphs Are Eating The World http://www.asterdata.com/resources/video-discovery-platform.phpttp://www.zdnet.com/teradata-aster-gets-graph-database-hdfs-compatible-file-store-7000021667/ Thursday, April 17, 14
  • 12. Neo Technology, Inc Confidential http://www.forrester.com/TechRadar+Enterprise+DBMS+Q1+2014/fulltext/-/E-RES106801 Graphs Are Eating The World “Forrester estimates that over 25% of enterprises will be using graph databases by 2017” Thursday, April 17, 14
  • 13. Neo Technology, Inc Confidential Graphs Are Eating The World *Source: http://db-engines.com/en/ranking Thursday, April 17, 14
  • 14. Neo Technology, Inc Confidential Graphs Are Eating The World Finance Accenture Thursday, April 17, 14
  • 15. Neo Technology, Inc Confidential What Is A Graph, Anyway? Thursday, April 17, 14
  • 16. Neo Technology, Inc Confidential Graphs! Dancing With Michael Jackson Eating Brains Thursday, April 17, 14
  • 17. Neo Technology, Inc Confidential Dancing With Michael Jackson Eating Brains Not really. These are Charts! Thursday, April 17, 14
  • 18. Neo Technology, Inc Confidential Thursday, April 17, 14
  • 19. Neo Technology, Inc Confidential What Is “Graph Search,” Anyway? Thursday, April 17, 14
  • 20. Neo Technology, Inc Confidential Cypher LOVES A B Graph PatternsASCII art MATCH (A) -[:LOVES]-> (B) WHERE A.name = "A" RETURN B Thursday, April 17, 14
  • 21. Neo Technology, Inc Confidential MATCH (me:Person)-[:IS_FRIEND_OF]->(friend:Person), (friend)-[:LIKES]->(restaurant), (restaurant)-[:LOCATED_IN]->(newyork:City), (restaurant)-[:SERVES]->(sushi:Cuisine) WHERE me.name = 'Emil' AND newyork.location='New York' AND sushi.cuisine='Sushi' RETURN restaurant.name http://maxdemarzi.com/?s=facebook Thursday, April 17, 14
  • 22. Neo Technology, Inc Confidential Thursday, April 17, 14
  • 23. “Find all direct reports and how many they manage, up to 3 levels down” Example HR Query (using SQL) Thursday, April 17, 14
  • 24. *“Find all direct reports and how many they manage, up to 3 levels down” (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM ( SELECT manager.pid AS directReportees, 0 AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION SELECT manager.pid AS directReportees, count(manager.directly_manages) AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT manager.pid AS directReportees, count(reportee.directly_manages) AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT manager.pid AS directReportees, count(L2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM ( SELECT manager.directly_manages AS directReportees, 0 AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION SELECT reportee.pid AS directReportees, count(reportee.directly_manages) AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION (continued from previous page...) SELECT depth1Reportees.pid AS directReportees, count(depth2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM( SELECT reportee.directly_manages AS directReportees, 0 AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT L2Reportees.pid AS directReportees, count(L2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT L2Reportees.directly_manages AS directReportees, 0 AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") ) Example HR Query (using SQL) Thursday, April 17, 14
  • 25. MATCH  (boss)-­‐[:MANAGES*0..3]-­‐>(sub),            (sub)-­‐[:MANAGES*1..3]-­‐>(report) WHERE  boss.name  =  “John  Doe” RETURN  sub.name  AS  Subordinate,  count(report)  AS  Total Same Query in Cypher *“Find all direct reports and how many they manage, up to 3 levels down” Thursday, April 17, 14
  • 26. Neo Technology, Inc Confidential What About Performance? Database # persons query time MySQL Neo4j Neo4j 1,000 ๏a sample social graph •with ~1,000 persons ๏average 50 friends per person ๏pathExists(a,b) limited to depth 4 ๏caches warmed up to eliminate disk I/O Thursday, April 17, 14
  • 27. Neo Technology, Inc Confidential What About Performance? Database # persons query time MySQL Neo4j Neo4j 1,000 2,000 ms ๏a sample social graph •with ~1,000 persons ๏average 50 friends per person ๏pathExists(a,b) limited to depth 4 ๏caches warmed up to eliminate disk I/O Thursday, April 17, 14
  • 28. Neo Technology, Inc Confidential Database # persons query time MySQL Neo4j Neo4j 1,000 2,000 ms 1,000 2 ms ๏a sample social graph •with ~1,000 persons ๏average 50 friends per person ๏pathExists(a,b) limited to depth 4 ๏caches warmed up to eliminate disk I/O What About Performance? Thursday, April 17, 14
  • 29. Neo Technology, Inc Confidential Database # persons query time MySQL Neo4j Neo4j 1,000 2,000 ms 1,000 2 ms 1,000,000 ๏a sample social graph •with ~1,000 persons ๏average 50 friends per person ๏pathExists(a,b) limited to depth 4 ๏caches warmed up to eliminate disk I/O What About Performance? Thursday, April 17, 14
  • 30. Neo Technology, Inc Confidential Database # persons query time MySQL Neo4j Neo4j 1,000 2,000 ms 1,000 2 ms 1,000,000 2 ms ๏a sample social graph •with ~1,000 persons ๏average 50 friends per person ๏pathExists(a,b) limited to depth 4 ๏caches warmed up to eliminate disk I/O What About Performance? Thursday, April 17, 14
  • 31. Neo Technology, Inc Confidential “Our  Neo4j  solution  is  literally  thousands  of  times   faster  than  the  prior  MySQL  solution, with  queries  that  require  10-­‐100  times  less  code.” -­‐  Volker  Pacher,  Senior  Developer  eBay What About Performance? Thursday, April 17, 14
  • 33. Neo Technology, Inc Confidential Use Cases Thursday, April 17, 14
  • 34. Neo Technology, Inc Confidential Network Impact Analysis Thursday, April 17, 14
  • 35. Neo Technology, Inc Confidential Network Management Example (Network Graph) Thursday, April 17, 14
  • 36. Neo Technology, Inc Confidential Network Management - Create CREATE ! (crm {name:"CRM"}), ! (dbvm {name:"Database VM"}), ! (www {name:"Public Website"}), ! (wwwvm {name:"Webserver VM"}), ! (srv1 {name:"Server 1"}), ! (san {name:"SAN"}), ! (srv2 {name:"Server 2"}), ! (crm)-[:DEPENDS_ON]->(dbvm), ! (dbvm)-[:DEPENDS_ON]->(srv2), ! (srv2)-[:DEPENDS_ON]->(san), ! (www)-[:DEPENDS_ON]->(dbvm), ! (www)-[:DEPENDS_ON]->(wwwvm), ! (wwwvm)-[:DEPENDS_ON]->(srv1), ! (srv1)-[:DEPENDS_ON]->(san) Practical Cypher Thursday, April 17, 14
  • 37. Neo Technology, Inc Confidential Network Management - Impact Analysis // Server 1 Outage MATCH (n)<-[:DEPENDS_ON*]-(upstream) WHERE n.name = "Server 1" RETURN upstream Practical Cypher upstream {name:"Webserver VM"} {name:"Public Website"} Thursday, April 17, 14
  • 38. Neo Technology, Inc Confidential Network Management - Dependency Analysis // Public website dependencies MATCH (n)-[:DEPENDS_ON*]->(downstream) WHERE n.name = "Public Website" RETURN downstream Practical Cypher downstream {name:"Database VM"} {name:"Server 2"} {name:"SAN"} {name:"Webserver VM"} {name:"Server 1"} Thursday, April 17, 14
  • 39. Neo Technology, Inc Confidential Network Management - Statistics // Most depended on component MATCH (n)<-[:DEPENDS_ON*]-(dependent) RETURN n, count(DISTINCT dependent) AS dependents ORDER BY dependents DESC LIMIT 1 Practical Cypher n dependents {name:"SAN"} 6 Thursday, April 17, 14
  • 40. Neo Technology, Inc Confidential Route Finding Thursday, April 17, 14
  • 41. Neo Technology, Inc Confidential Recommendations Thursday, April 17, 14
  • 42. Neo Technology, Inc Confidential Logistics Thursday, April 17, 14
  • 43. Neo Technology, Inc Confidential Access Control Thursday, April 17, 14
  • 44. Neo Technology, Inc Confidential Fraud Detection Thursday, April 17, 14
  • 45. Neo Technology, Inc Confidential Securities and Debt Thursday, April 17, 14
  • 46. Neo Technology, Inc Confidential Basically: Graph All The Things!!!1 Thursday, April 17, 14
  • 47. Gartner’s “5 Graphs” Social Graph Ref: http://www.gartner.com/id=2081316 Interest Graph Payment Graph Intent Graph Mobile Graph Thursday, April 17, 14
  • 48. Neo Technology, Inc Confidential • Network Graph (e.g. Network Dependency Analysis, Network Inventory, etc.) • Social Graph (mobile apps, social recommendations, collaboration) • Call Graph (creating inferred social graph, churn reduction, etc.) • Master Data Graph (org & product hierarchy, data governance, IAM) • Help Desk Graph (enterprise collaboration) 5 Graphs of Telco Thursday, April 17, 14
  • 49. Neo Technology, Inc Confidential • Payment Graph (e.g. Fraud Detection, Credit Risk Analysis, Chargebacks...) • Customer Graph (org drillthru, product recommendations, mobile payments, etc.) • Entitlement Graph (identity & access management, authorization) • Asset Graph (portfolio analytics, risk management, market & sentiment analysis, compliance) • Master Data Graph (enterprise collaboration, corporate hierarchy, data governance) 5 Graphs of Finance Finance Finance Thursday, April 17, 14
  • 50. Neo Technology, Inc Confidential • Provider Graph (e.g. referrals, patient management, research) • Patient Graph (support communities, doctor recommendations, clinical trials) • Bioinformatic Graph (drug research, genetic screening, bioengineering, etc.) • Master Data Graph (biological master data, evolutionary taxonomy, the access control graph, etc.) • Treatment Graph (collaborative medicine, clinical trials, etc.) 5 Graphs of Health Care Thursday, April 17, 14
  • 51. Neo Technology, Inc Confidential Graph Databases The Definitive Book on Graph Databases Available as a free PDF download at graphdatabases.com! Thursday, April 17, 14
  • 52. Neo Technology, Inc Confidential Brown Bag Lunch By request only! • you bring 10+ colleagues • you provide a room with a projector + screen • we bring a bag lunch • we introduce Neo4j to your team in 45 min + 15 min for Q&A Schedule your Neo4j Intro now! Thursday, April 17, 14
  • 53. • The premier source for training on Graph Databases and Neo4j • Join us for the ‘All You Can Graph Day’ on May 9 in Palo Alto! • Sign up at graphacademy.com Thursday, April 17, 14
  • 54. • Wednesday, Oct. 22 - graphconnect.com • Only conference focused on graphDBs and applications powered by graphs • Register now for $99 Alpha Geek Passes GRAPHCONNECT SF 2014 Thursday, April 17, 14
  • 55. • 4/24 - GraphPUB Silicon Valley at Tied House • 5/1 - Uncovering Invisible Relationships with a GraphDB at Medium • 5/6 - GraphPANEL Silicon Valley at AOL • And more at: meetup.com/graphdb-sf UPCOMING EVENTS GRAPHPUB NEO4J 20 14 Thursday, April 17, 14
  • 57. Neo Technology, Inc Confidential teh end (sic) stay connected Thursday, April 17, 14