SlideShare a Scribd company logo
Graph Databases 
for SQL Server Professionals 
Stéphane Fréchette 
Thursday September 18, 2014
Who am I? 
My name is Stéphane Fréchette 
SQL Server MVP | Consultant | Speaker | Database & BI Architect | NoSQL. 
Drums, good food and fine wine. Founder @ukubu, @GatineauOuverte, 
@TEDxGatineau 
I have a passion for architecting, designing and building solutions that 
matter. 
Twitter: @sfrechette 
Blog: stephanefrechette.com 
Email: stephanefrechette@ukubu.com
Session Outline 
• What is a Graph? 
• What is Neo4j? 
• Data Modeling – The Property Graph 
• Cypher Query Language 
• Importing Data… 
• Use Cases 
• Demos 
• Resources
What is a Graph?
Are these Graphs?
This is a Graph 
Node 
Relationship 
A Property Graph
Organization Project Graph
Twitter Social Graph
What is Neo4j? 
An open-source graph database by Neo 
Technology. Neo4j stores data in nodes 
connected by directed, typed relationships 
with properties on both, also know as a 
Property Graph 
• Fully ACID compliant 
• Massively scalable, up to several billion 
nodes/relationships/properties 
• Highly-available, when distributed across multiple 
machines 
• Accessible by a convenient REST interface or an 
object-oriented Java API
Data Modeling 
From SQL Server to Graph 
Property Graph
Example: Meetup Data In SQL Server 
Member MeetupOrganizer MeetupMember Meetup 
ID Member 
1 Daniel 
2 Stephane 
3 John 
4 Randy 
ID Name 
1 Ottawa SQL Server User Group 
2 Ottawa JavaScript 
3 Ottawa Visio User Group 
4 Ottawa Tableau User Group 
5 Dirty Dancing Ottawa 
MemberID MeetupID 
2 1 
1 2 
3 3 
2 4 
3 5 
MemberID MeetupID 
3 1 
3 2 
4 2 
4 4 
1 5
Example: Meetup Data In a Graph Member Meetup 
name: ‘Stephane’ 
name: ‘Ottawa Tableau User Group’ 
name: ‘Ottawa SQL Server User Group’ 
name: ‘John’ 
name: ‘Ottawa JavaScript’ 
name: ‘Ottawa Visio User Group’ 
name: ‘Dirty Dancing Ottawa’ 
name: ‘Randy’ 
name: ‘Daniel’
Cypher Query Language 
Cypher is a declarative graph query language that allows for expressive and 
efficient querying and updating of the graph store 
• Pattern-matching 
• Declarative: what to retrieve, not how to retrieve it 
• Inspired from other known Language (SQL, SPARQL, Haskell, Python) 
• Aggregation, Ordering, Limit 
• Update the Graph
Cypher and T-SQL 
Cypher also has a number of keywords that have a direct equivalence with SQL 
which makes it a curiously familiar language 
• WHERE 
• ORDER BY 
• LIMIT 
• SUM, COUNT, STDEVP, MIN, MAX etc… 
• LTRIM, UPPER, LOWER, REPLACE, LEFT, RIGHT, SUBSTRING 
• DISTINCT 
• CASE 
(SQL Server Pros) – [:WILL_LOVE] -> (Cypher)
Cypher - Meetup
Neo4j Browser
Demo 
(let’s query some data…)
Importing Data…
Importing Data… 
Some important considerations… 
Different import scenarios 
• Dataset size: 1000s, 100000s, 10000000s 
• Dataset format (source): Database, File (CSV, Spreadsheet, GraphML, Geoff), Service, Other 
• Import type: Initial Bulk Load, Incremental Load, Initial Bulk Load + Incremental Load 
Different import tools 
• Spreadsheet based 
• Neo4j-shell based: (Cypher, neo4j-shell-tools, Cypher LOAD CSV) 
• Command-line based: Batch Importer 
• Neo4j Brower based 
• ETL Tools: (Talend, Mulesoft, Pentaho Kettle) 
• Custom software: (Java API, REST API, Spring Data Neo4j)
Many different mappings 
Import 
Scenarios 
Import Tools 
Not always clear what you should be using 
Depends on your skillsets, dataset size… (lots of other stuff) 
Choose wisely!
Demo 
(walkthrough on importing data…)
The Sample Dataset
Importing using Spreadsheets 
Very small size datasets < 1000, easy to use 
Format data in 
spreadsheet 
Generate Cypher 
statements with 
formulas 
Copy and Execute 
Cypher in Neo4j 
browser
Importing using Spreadsheets
Importing using neo4j-shell-tools 
Small to medium size datasets 
https://github.com/jexp/neo4j-shell-tools 
Format data in CSV 
files 
Create import-cypher 
commands for 
neo4j-shell-tools 
Execute commands 
from neo4j-shell
Importing using neo4j-shell-tools
Importing using LOAD CSV 
Native Cypher 
Format data in 
CSV files 
Create 
“LOAD CSV” 
commands 
Execute 
command from 
neo4j-shell or 
browser 
Additional 
“cleanup” for 
Labels and 
RelTypes
Importing using LOAD CSV
Importing using Batch Importer 
Non-transactional import, suited for very very large datasets 
Format data in 
TSV files 
Execute Batch 
Import command 
Copy store files 
to Neo4j Server 
directory 
Start Neo4j Server 
with generated 
store files
Use Cases 
Principal uses of Graph Database include 
• Network and Data Center Management 
(Queries: Impact Analysis, Root Cause Analysis, Quality-of-Service Mapping, Asset Management) 
• Authorization and Access 
(Queries : Access Management, Interconnected Group Organization, Provenance) 
• Social 
(Queries : Friend Recommendations, Sharing & Collaboration, Influencer Analysis) 
• Geo 
(Queries : Routing, Logistics, Capacity Planning) 
• Recommendations 
(Queries : Product, Social, Service, and Professional Recommendations) 
• Fraud Detection 
http://www.neotechnology.com/neo4j-use-cases/
Summary 
(graphs)-[:ARE]->(everywhere)
Resources 
• Neo Technology http://www.neotechnology.com/ 
• Neoj.org (Learn, Develop, Downloads,…) http://www.neo4j.org/ 
• Neo4j on Vimeo http://vimeo.com/neo4j 
• Neo4j on SlideShare http://www.slideshare.net/neo4j 
• Neo4j on Github https://github.com/neo4j 
• Neo4j Cypher Cheat Sheet http://docs.neo4j.org/refcard/2.1/ 
• Neo4j Graph Database as a Service http://www.graphenedb.com/ 
• Linkurious – The easiest way to explore graph databases 
http://linkurio.us/ 
• KeyLines- Visualize dynamic networks http://keylines.com/ 
• Experiments with NEO4J: Using a graph database as a SQL Server 
metadata hub http://bit.ly/V2PrxN 
• Kenny Bastani http://www.kennybastani.com/ 
• Rik Van Bruggen http://blog.bruggen.com/ 
• Max de Marzi http://maxdemarzi.com/ 
• Better Software Development http://jexp.de/blog/ 
• Graph Databases (Free Book) http://graphdatabases.com/ 
• Neo4j GraphGist http://gist.neo4j.org/ 
• GraphConnect Conference http://graphconnect.com/ 
• Titan – Distributed Graph Database 
https://thinkaurelius.github.io/titan/ 
• InfiniteGraph http://www.infinitegraph.com/ 
• OrientDB http://www.orientechnologies.com/ 
• Cayley by Google https://github.com/google/cayley
What Questions Do You Have?
Thank You 
For attending this session

More Related Content

What's hot (19)

PDF
What’s New in Spark 2.0: Structured Streaming and Datasets - StampedeCon 2016
StampedeCon
 
PDF
Prague data management meetup 2018-03-27
Martin Bém
 
PPTX
Architecting Your First Big Data Implementation
Adaryl "Bob" Wakefield, MBA
 
PDF
IS OLAP DEAD IN THE AGE OF BIG DATA?
DataWorks Summit
 
PPTX
SQL on Hadoop for the Oracle Professional
Michael Rainey
 
PPTX
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
Łukasz Grala
 
PPTX
Building a Big Data Pipeline
Jesus Rodriguez
 
PDF
Hadoop Architecture Options for Existing Enterprise DataWarehouse
Asis Mohanty
 
PPTX
Strata sf - Amundsen presentation
Tao Feng
 
PDF
Using Oracle Big Data SQL 3.0 to add Hadoop & NoSQL to your Oracle Data Wareh...
Mark Rittman
 
PPTX
Using Hadoop to build a Data Quality Service for both real-time and batch data
DataWorks Summit/Hadoop Summit
 
PDF
Using Oracle Big Data Discovey as a Data Scientist's Toolkit
Mark Rittman
 
PDF
How a Tweet Went Viral - BIWA Summit 2017
Rittman Analytics
 
PDF
From lots of reports (with some data Analysis) 
to Massive Data Analysis (Wit...
Mark Rittman
 
PDF
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Mark Rittman
 
PDF
Intro to graphs for HR analytics
Rik Van Bruggen
 
PDF
An Introduction to Graph: Database, Analytics, and Cloud Services
Jean Ihm
 
PDF
Intro to Big Data - Spark
Sofian Hadiwijaya
 
PPTX
How Lyft Drives Data Discovery
Neo4j
 
What’s New in Spark 2.0: Structured Streaming and Datasets - StampedeCon 2016
StampedeCon
 
Prague data management meetup 2018-03-27
Martin Bém
 
Architecting Your First Big Data Implementation
Adaryl "Bob" Wakefield, MBA
 
IS OLAP DEAD IN THE AGE OF BIG DATA?
DataWorks Summit
 
SQL on Hadoop for the Oracle Professional
Michael Rainey
 
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
Łukasz Grala
 
Building a Big Data Pipeline
Jesus Rodriguez
 
Hadoop Architecture Options for Existing Enterprise DataWarehouse
Asis Mohanty
 
Strata sf - Amundsen presentation
Tao Feng
 
Using Oracle Big Data SQL 3.0 to add Hadoop & NoSQL to your Oracle Data Wareh...
Mark Rittman
 
Using Hadoop to build a Data Quality Service for both real-time and batch data
DataWorks Summit/Hadoop Summit
 
Using Oracle Big Data Discovey as a Data Scientist's Toolkit
Mark Rittman
 
How a Tweet Went Viral - BIWA Summit 2017
Rittman Analytics
 
From lots of reports (with some data Analysis) 
to Massive Data Analysis (Wit...
Mark Rittman
 
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Mark Rittman
 
Intro to graphs for HR analytics
Rik Van Bruggen
 
An Introduction to Graph: Database, Analytics, and Cloud Services
Jean Ihm
 
Intro to Big Data - Spark
Sofian Hadiwijaya
 
How Lyft Drives Data Discovery
Neo4j
 

Viewers also liked (20)

PPTX
Data Analytics with R and SQL Server
Stéphane Fréchette
 
PDF
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
Emil Eifrem
 
PDF
SQL Server 2014 Faster Insights from Any Data
Stéphane Fréchette
 
PPTX
Lessons learned from designing a QA Automation for analytics databases (big d...
Omid Vahdaty
 
PDF
Graph Search: The Power of Connected Data
Codemotion
 
PPTX
Back to the future - Temporal Table in SQL Server 2016
Stéphane Fréchette
 
KEY
Intro to Spring Data Neo4j
jexp
 
PDF
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
Emil Eifrem
 
PDF
Dbta Webinar Realize Value of Big Data with graph 011713
InfiniteGraph
 
PDF
Graph Databases - Where Do We Do the Modeling Part?
DATAVERSITY
 
PPT
10. Graph Databases
Fabio Fumarola
 
PPTX
NoSQL Graph Databases - Why, When and Where
Eugene Hanikblum
 
PDF
A walk in graph databases v1.0
Pierre De Wilde
 
PDF
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB
 
PDF
SQL Server 2016 R Services + Microsoft R Server 技術資料
Koichiro Sasaki
 
KEY
Intro to Neo4j presentation
jexp
 
ODP
BDD with Cucumber
Knoldus Inc.
 
PPTX
Taking R Analytics to SQL and the Cloud
Revolution Analytics
 
PPT
An Introduction to Graph Databases
InfiniteGraph
 
PDF
Converting Relational to Graph Databases
Antonio Maccioni
 
Data Analytics with R and SQL Server
Stéphane Fréchette
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
Emil Eifrem
 
SQL Server 2014 Faster Insights from Any Data
Stéphane Fréchette
 
Lessons learned from designing a QA Automation for analytics databases (big d...
Omid Vahdaty
 
Graph Search: The Power of Connected Data
Codemotion
 
Back to the future - Temporal Table in SQL Server 2016
Stéphane Fréchette
 
Intro to Spring Data Neo4j
jexp
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
Emil Eifrem
 
Dbta Webinar Realize Value of Big Data with graph 011713
InfiniteGraph
 
Graph Databases - Where Do We Do the Modeling Part?
DATAVERSITY
 
10. Graph Databases
Fabio Fumarola
 
NoSQL Graph Databases - Why, When and Where
Eugene Hanikblum
 
A walk in graph databases v1.0
Pierre De Wilde
 
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB
 
SQL Server 2016 R Services + Microsoft R Server 技術資料
Koichiro Sasaki
 
Intro to Neo4j presentation
jexp
 
BDD with Cucumber
Knoldus Inc.
 
Taking R Analytics to SQL and the Cloud
Revolution Analytics
 
An Introduction to Graph Databases
InfiniteGraph
 
Converting Relational to Graph Databases
Antonio Maccioni
 
Ad

Similar to Graph Databases for SQL Server Professionals (20)

PPTX
Graph databases for SQL Server profesionnals
MSDEVMTL
 
PPTX
Graph Databases for SQL Server Professionals - SQLSaturday #350 Winnipeg
Stéphane Fréchette
 
PDF
There and Back Again, A Developer's Tale
Neo4j
 
PPTX
Neo4j Training Introduction
Max De Marzi
 
PDF
Intro to Neo4j and Graph Databases
Neo4j
 
PDF
Ultime Novità di Prodotto Neo4j
Neo4j
 
PPTX
From Relational to Graph: How Going Graph Revealed the Unknown(Jason_Schatz)....
Neo4j
 
PPTX
Neo4j GraphTalk Florence - Introduction to the Neo4j Graph Platform
Neo4j
 
PDF
Neo4j: Graph-like power
Roman Rodomansky
 
PDF
managing big data
Suveeksha
 
PDF
Neo4j: The path to success with Graph Database and Graph Data Science
Neo4j
 
PDF
Neo4j (Part 1)
Bibhuti Regmi
 
PDF
Road to NODES Workshop Series - Intro to Neo4j
Neo4j
 
PDF
Getting started with Graph Databases & Neo4j
Suroor Wijdan
 
PPTX
Relational to Graph - Import
Neo4j
 
PDF
Neo4j Introduction Workshop for Partners
Deepak Sood
 
PPTX
Neo4j graph database
Prashant Bhargava
 
PDF
Neo4j GraphTalks Oslo - Introduction to Graphs
Neo4j
 
PDF
Scalability and Graph Analytics with Neo4j - Stefan Kolmar, Neo4j
Neo4j
 
PDF
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j
 
Graph databases for SQL Server profesionnals
MSDEVMTL
 
Graph Databases for SQL Server Professionals - SQLSaturday #350 Winnipeg
Stéphane Fréchette
 
There and Back Again, A Developer's Tale
Neo4j
 
Neo4j Training Introduction
Max De Marzi
 
Intro to Neo4j and Graph Databases
Neo4j
 
Ultime Novità di Prodotto Neo4j
Neo4j
 
From Relational to Graph: How Going Graph Revealed the Unknown(Jason_Schatz)....
Neo4j
 
Neo4j GraphTalk Florence - Introduction to the Neo4j Graph Platform
Neo4j
 
Neo4j: Graph-like power
Roman Rodomansky
 
managing big data
Suveeksha
 
Neo4j: The path to success with Graph Database and Graph Data Science
Neo4j
 
Neo4j (Part 1)
Bibhuti Regmi
 
Road to NODES Workshop Series - Intro to Neo4j
Neo4j
 
Getting started with Graph Databases & Neo4j
Suroor Wijdan
 
Relational to Graph - Import
Neo4j
 
Neo4j Introduction Workshop for Partners
Deepak Sood
 
Neo4j graph database
Prashant Bhargava
 
Neo4j GraphTalks Oslo - Introduction to Graphs
Neo4j
 
Scalability and Graph Analytics with Neo4j - Stefan Kolmar, Neo4j
Neo4j
 
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j
 
Ad

More from Stéphane Fréchette (13)

PPTX
Self-Service Data Integration with Power Query - SQLSaturday #364 Boston
Stéphane Fréchette
 
PPTX
Power BI - Bring your data together
Stéphane Fréchette
 
PPTX
Self-Service Data Integration with Power Query
Stéphane Fréchette
 
PPTX
Introduction to Azure HDInsight
Stéphane Fréchette
 
PDF
Le journalisme de données... par où commencer?
Stéphane Fréchette
 
PPTX
Modernizing Your Data Warehouse using APS
Stéphane Fréchette
 
PPTX
TEDxGatineau
Stéphane Fréchette
 
PPTX
Power BI
Stéphane Fréchette
 
PPTX
Introduction to Master Data Services in SQL Server 2012
Stéphane Fréchette
 
PDF
Data Quality Services in SQL Server 2012
Stéphane Fréchette
 
PDF
Business Intelligence in Excel 2013
Stéphane Fréchette
 
KEY
Gatineau Ouverte troisième rencontre publique
Stéphane Fréchette
 
KEY
Gatineau Ouverte première rencontre publique
Stéphane Fréchette
 
Self-Service Data Integration with Power Query - SQLSaturday #364 Boston
Stéphane Fréchette
 
Power BI - Bring your data together
Stéphane Fréchette
 
Self-Service Data Integration with Power Query
Stéphane Fréchette
 
Introduction to Azure HDInsight
Stéphane Fréchette
 
Le journalisme de données... par où commencer?
Stéphane Fréchette
 
Modernizing Your Data Warehouse using APS
Stéphane Fréchette
 
TEDxGatineau
Stéphane Fréchette
 
Introduction to Master Data Services in SQL Server 2012
Stéphane Fréchette
 
Data Quality Services in SQL Server 2012
Stéphane Fréchette
 
Business Intelligence in Excel 2013
Stéphane Fréchette
 
Gatineau Ouverte troisième rencontre publique
Stéphane Fréchette
 
Gatineau Ouverte première rencontre publique
Stéphane Fréchette
 

Recently uploaded (20)

PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 

Graph Databases for SQL Server Professionals

  • 1. Graph Databases for SQL Server Professionals Stéphane Fréchette Thursday September 18, 2014
  • 2. Who am I? My name is Stéphane Fréchette SQL Server MVP | Consultant | Speaker | Database & BI Architect | NoSQL. Drums, good food and fine wine. Founder @ukubu, @GatineauOuverte, @TEDxGatineau I have a passion for architecting, designing and building solutions that matter. Twitter: @sfrechette Blog: stephanefrechette.com Email: [email protected]
  • 3. Session Outline • What is a Graph? • What is Neo4j? • Data Modeling – The Property Graph • Cypher Query Language • Importing Data… • Use Cases • Demos • Resources
  • 4. What is a Graph?
  • 6. This is a Graph Node Relationship A Property Graph
  • 9. What is Neo4j? An open-source graph database by Neo Technology. Neo4j stores data in nodes connected by directed, typed relationships with properties on both, also know as a Property Graph • Fully ACID compliant • Massively scalable, up to several billion nodes/relationships/properties • Highly-available, when distributed across multiple machines • Accessible by a convenient REST interface or an object-oriented Java API
  • 10. Data Modeling From SQL Server to Graph Property Graph
  • 11. Example: Meetup Data In SQL Server Member MeetupOrganizer MeetupMember Meetup ID Member 1 Daniel 2 Stephane 3 John 4 Randy ID Name 1 Ottawa SQL Server User Group 2 Ottawa JavaScript 3 Ottawa Visio User Group 4 Ottawa Tableau User Group 5 Dirty Dancing Ottawa MemberID MeetupID 2 1 1 2 3 3 2 4 3 5 MemberID MeetupID 3 1 3 2 4 2 4 4 1 5
  • 12. Example: Meetup Data In a Graph Member Meetup name: ‘Stephane’ name: ‘Ottawa Tableau User Group’ name: ‘Ottawa SQL Server User Group’ name: ‘John’ name: ‘Ottawa JavaScript’ name: ‘Ottawa Visio User Group’ name: ‘Dirty Dancing Ottawa’ name: ‘Randy’ name: ‘Daniel’
  • 13. Cypher Query Language Cypher is a declarative graph query language that allows for expressive and efficient querying and updating of the graph store • Pattern-matching • Declarative: what to retrieve, not how to retrieve it • Inspired from other known Language (SQL, SPARQL, Haskell, Python) • Aggregation, Ordering, Limit • Update the Graph
  • 14. Cypher and T-SQL Cypher also has a number of keywords that have a direct equivalence with SQL which makes it a curiously familiar language • WHERE • ORDER BY • LIMIT • SUM, COUNT, STDEVP, MIN, MAX etc… • LTRIM, UPPER, LOWER, REPLACE, LEFT, RIGHT, SUBSTRING • DISTINCT • CASE (SQL Server Pros) – [:WILL_LOVE] -> (Cypher)
  • 17. Demo (let’s query some data…)
  • 19. Importing Data… Some important considerations… Different import scenarios • Dataset size: 1000s, 100000s, 10000000s • Dataset format (source): Database, File (CSV, Spreadsheet, GraphML, Geoff), Service, Other • Import type: Initial Bulk Load, Incremental Load, Initial Bulk Load + Incremental Load Different import tools • Spreadsheet based • Neo4j-shell based: (Cypher, neo4j-shell-tools, Cypher LOAD CSV) • Command-line based: Batch Importer • Neo4j Brower based • ETL Tools: (Talend, Mulesoft, Pentaho Kettle) • Custom software: (Java API, REST API, Spring Data Neo4j)
  • 20. Many different mappings Import Scenarios Import Tools Not always clear what you should be using Depends on your skillsets, dataset size… (lots of other stuff) Choose wisely!
  • 21. Demo (walkthrough on importing data…)
  • 23. Importing using Spreadsheets Very small size datasets < 1000, easy to use Format data in spreadsheet Generate Cypher statements with formulas Copy and Execute Cypher in Neo4j browser
  • 25. Importing using neo4j-shell-tools Small to medium size datasets https://github.com/jexp/neo4j-shell-tools Format data in CSV files Create import-cypher commands for neo4j-shell-tools Execute commands from neo4j-shell
  • 27. Importing using LOAD CSV Native Cypher Format data in CSV files Create “LOAD CSV” commands Execute command from neo4j-shell or browser Additional “cleanup” for Labels and RelTypes
  • 29. Importing using Batch Importer Non-transactional import, suited for very very large datasets Format data in TSV files Execute Batch Import command Copy store files to Neo4j Server directory Start Neo4j Server with generated store files
  • 30. Use Cases Principal uses of Graph Database include • Network and Data Center Management (Queries: Impact Analysis, Root Cause Analysis, Quality-of-Service Mapping, Asset Management) • Authorization and Access (Queries : Access Management, Interconnected Group Organization, Provenance) • Social (Queries : Friend Recommendations, Sharing & Collaboration, Influencer Analysis) • Geo (Queries : Routing, Logistics, Capacity Planning) • Recommendations (Queries : Product, Social, Service, and Professional Recommendations) • Fraud Detection http://www.neotechnology.com/neo4j-use-cases/
  • 32. Resources • Neo Technology http://www.neotechnology.com/ • Neoj.org (Learn, Develop, Downloads,…) http://www.neo4j.org/ • Neo4j on Vimeo http://vimeo.com/neo4j • Neo4j on SlideShare http://www.slideshare.net/neo4j • Neo4j on Github https://github.com/neo4j • Neo4j Cypher Cheat Sheet http://docs.neo4j.org/refcard/2.1/ • Neo4j Graph Database as a Service http://www.graphenedb.com/ • Linkurious – The easiest way to explore graph databases http://linkurio.us/ • KeyLines- Visualize dynamic networks http://keylines.com/ • Experiments with NEO4J: Using a graph database as a SQL Server metadata hub http://bit.ly/V2PrxN • Kenny Bastani http://www.kennybastani.com/ • Rik Van Bruggen http://blog.bruggen.com/ • Max de Marzi http://maxdemarzi.com/ • Better Software Development http://jexp.de/blog/ • Graph Databases (Free Book) http://graphdatabases.com/ • Neo4j GraphGist http://gist.neo4j.org/ • GraphConnect Conference http://graphconnect.com/ • Titan – Distributed Graph Database https://thinkaurelius.github.io/titan/ • InfiniteGraph http://www.infinitegraph.com/ • OrientDB http://www.orientechnologies.com/ • Cayley by Google https://github.com/google/cayley
  • 33. What Questions Do You Have?
  • 34. Thank You For attending this session

Editor's Notes

  • #6: Nope, these are Charts, Bar and Line Charts…
  • #7: This a Graph, a Property Graph
  • #8: Sample Organization Project Graph
  • #9: Sample Twitter Social Graph
  • #10: NoSQL Category