SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Getting started with
Graph Databases & Neo4j
Suroor Wijdan
@wotthetech
Agenda for Today
● Intro to Graph Databases
● Who is using graph databases?
● What is Neo4j?
● MongoDB vs Neo4j?
● Nodes and Relationships
● Cypher Query Language
● CRUD operations in CQL
● Project Use Case
● Questions?
● Exercises
What is NoSQL?
● NoSQL stands for “Not Only SQL”
● Some questions which you can ask to database:
○ What is my Average Income?
○ What Items I have in his Shopping Cart?
○ How did I get into this session?
- Ask a RDBMS
- Ask a Key Value Store
- Ask a Graph
Intro to Graph Databases
Graph is everywhere
● Graph Databases
present a new
perspective on the
same type of data.
● Graph is the most
generic type of data
structure capable of
storing data in highly
accessible way
● Suitable for any kind of
data that is related
● Graph databases are
optimized for the
relations between
records
● a graph containing Nodes &
Relationships
● with both having Properties
● verily perfect for complex and
highly connected data
Important Quote
A Quote....
“A relational database may tell you how much your
customer has spent at your store”
“but”
“a graph database will tell your customers what
should they buy next”
Who is using Graph Databases?
● Some big names using Graph Databases:
○ Facebook - Open Graph Database
○ Google - Knowledge Graph
○ Twitter - FlockDB distributed graph Database
○ Adobe
○ Glassdoor
○ JustDial
○ CareerBuilder
○ Indiatimes
○ telenor
○ Hellwet Packard
○ T-Mobile
○ Cisco
ALL
THESE
USE
What is Neo4j?
● Neo4j is a robust property graph database
● Fully Transactional (ACID)
● Highly Agile
● Best suited for data which is highly
connected
● Is supremely fast when it comes to querying
connected data
● The most popular graph database in the
world
● Highly scalable, up to several billion
nodes/relationships/properties
What is Neo4j?
● Neo4j allows infinite depth
● Uses Cypher Query Language for querying,
also has Java and REST API’s
● Human Readable Queries
● Data Modelling in Neo4j :
○ The whole model relies on the questions we have to
ask our database
○ Very easily done, even when designing domains in
SQL we tend to make graphs on whiteboards
● Neo4j helps us derive patterns from our data
MongoDB vs Neo4j
MongoDB is meant for cases where you would
like to have dynamic queries on quite a size of
data.
- Not capable of handling relationships
Neo4j is best suitable in use cases where you
have complex relationships and data which is
highly connected. Neo4j can help you find
routes, social patterns, etc. from your data.
- Not Horizontally Scalable (as of now)
Nodes and Relationships
● A minimal graph can consist of a single node
with properties defined on it.
● A Property graph has Nodes
and Relationships with properties
defined on them.
● node ( vertex)
● relationship (edge) :- with direction
● property(attribute) :- on nodes and relationships
Lets see an example: -
Nodes and Relationships
Da Vinci Code
Dan Brown Manoj
Roni
The Lost Symbol
Gone with the Wind
Suspense
Thriller
Nodes and Relationships
Da Vinci Code
Dan Brown Manoj
Roni
The Lost Symbol
Harry Potter
Suspense
Thriller
Authored By
Read By
Friendswith
Authored By
Recommends
Belongs To
BelongsTo
Belongs
To
Release Date
Recom
m
ends
J.K Rowling Authored By
An Example of Book Store with Recommendations
Cypher Query Language
● Is a declarative query language for querying Neo4j
● Expressive and Human readable syntax
● Matches patterns of nodes and relationships to
extract/modify information in the graph
● With cypher, we can create, update, remove
nodes, relationships and properties
● Has an online console at http://www.neo4j.
org/console
● Has a short learning curve due to similarities with
SQL query statements
Cypher Query Language
Create a Node:
CREATE (n:User { fname:"Manoj", lname:“Nama” });
● User is the Label
● n is the variable for new node
● {} brackets to add properties to the node
Cypher Query Language
Read Properties of a Node:
MATCH (n:User)
WHERE n.fname = “Manoj”
RETURN n
● User is the Label
● n is the variable for node
● WHERE to restrict the result to our
criteria
● RETURN the properties on the node
Cypher Query Language
Update property on a Node:
MATCH (user:User)
WHERE user.fname = 'Manoj'
SET user.lname = ‘Mohan’
RETURN user.fname, user.lname;
● User is the Label
● Restricts search to the nodes under USER
label
● SET adds a new property to the node
● RETURN clause indicates what data to
return
Cypher Query Language
Delete a Node:
MATCH (user:User)
WHERE user.fname = 'Emily'
DELETE user
● User is the Label
● Restricts search to the nodes under USER
label
● DELETE clause deletes a node from graph
● RETURN clause indicates what data to
return
Cypher Query Language
Set a new property on a Node after creation:
MATCH (user:User)
WHERE user.name = 'Roni'
SET user.country = ‘India’
RETURN user.name, user.country;
● User is the Label
● Restricts search to the nodes under USER
label
● SET adds or updates a property on a node
● RETURN clause indicates what data to
return
Cypher Query Language
Find a node in CQL
START n=node(*)
WHERE HAS (n.name) AND n.name = "Roni"
RETURN n;
● START clause to begin a query
● n=node(*) to search through all nodes
● WHERE clause to constrain the results
● n.name indicates the name property must
exist
● = "Roni" compares an existing name to the
value Roni
● RETURN clause requests particular results
Steps to get a Neo4j server up & running
(Linux)
Run the following commands in Terminal:
● sudo bash
● wget -O - http://debian.neo4j.
org/neotechnology.gpg.key | apt-key add -
● echo 'deb http://debian.neo4j.org/repo
stable/' > /etc/apt/sources.list.d/neo4j.
list
● apt-get install neo4j
● start neo4j server, available at http:
//localhost:7474 of the machine
neo4j start
Neo4j Web Admin
References
1. Online Manual - http://docs.neo4j.org/chunked/milestone/
2. Online Cypher Console - http://console.neo4j.org
3. Cypher Cheat Sheet - http://docs.neo4j.org/refcard/1.9/
4. Graph image taken from - http://www.neo4j.org
THANKS!
Get in touch for any queries :
twitter: @wotthetech
github: suroorwijdan
PS: You are free to share this ppt but give due credit to the creator wherever used.

Weitere ähnliche Inhalte

Was ist angesagt?

An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jDebanjan Mahata
 
Introducing Neo4j graph database
Introducing Neo4j graph databaseIntroducing Neo4j graph database
Introducing Neo4j graph databaseAmirhossein Saberi
 
RDBMS to Graph
RDBMS to GraphRDBMS to Graph
RDBMS to GraphNeo4j
 
Using Neo4j from Java
Using Neo4j from JavaUsing Neo4j from Java
Using Neo4j from JavaNeo4j
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - ImportNeo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Neo4J : Introduction to Graph Database
Neo4J : Introduction to Graph DatabaseNeo4J : Introduction to Graph Database
Neo4J : Introduction to Graph DatabaseMindfire Solutions
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)barcelonajug
 
Graph database & neo4j
Graph database & neo4jGraph database & neo4j
Graph database & neo4jSandip Jadhav
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jTobias Lindaaker
 
Performance of graph query languages
Performance of graph query languagesPerformance of graph query languages
Performance of graph query languagesAthiq Ahamed
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j FundamentalsMax De Marzi
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph DatabasesInfiniteGraph
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewNeo4j
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4jjexp
 
Introduction to graph databases, Neo4j and Spring Data - English 2015 Edition
Introduction to graph databases, Neo4j and Spring Data - English 2015 EditionIntroduction to graph databases, Neo4j and Spring Data - English 2015 Edition
Introduction to graph databases, Neo4j and Spring Data - English 2015 EditionAleksander Stensby
 
Intro to Cypher
Intro to CypherIntro to Cypher
Intro to CypherNeo4j
 
Django and Neo4j - Domain modeling that kicks ass
Django and Neo4j - Domain modeling that kicks assDjango and Neo4j - Domain modeling that kicks ass
Django and Neo4j - Domain modeling that kicks assTobias Lindaaker
 

Was ist angesagt? (20)

An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
 
Introducing Neo4j graph database
Introducing Neo4j graph databaseIntroducing Neo4j graph database
Introducing Neo4j graph database
 
RDBMS to Graph
RDBMS to GraphRDBMS to Graph
RDBMS to Graph
 
Using Neo4j from Java
Using Neo4j from JavaUsing Neo4j from Java
Using Neo4j from Java
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - Import
 
Intro to Neo4j 2.0
Intro to Neo4j 2.0Intro to Neo4j 2.0
Intro to Neo4j 2.0
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Neo4J : Introduction to Graph Database
Neo4J : Introduction to Graph DatabaseNeo4J : Introduction to Graph Database
Neo4J : Introduction to Graph Database
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
 
Graph database & neo4j
Graph database & neo4jGraph database & neo4j
Graph database & neo4j
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4j
 
Performance of graph query languages
Performance of graph query languagesPerformance of graph query languages
Performance of graph query languages
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j Overview
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4j
 
Introduction to graph databases, Neo4j and Spring Data - English 2015 Edition
Introduction to graph databases, Neo4j and Spring Data - English 2015 EditionIntroduction to graph databases, Neo4j and Spring Data - English 2015 Edition
Introduction to graph databases, Neo4j and Spring Data - English 2015 Edition
 
Intro to Cypher
Intro to CypherIntro to Cypher
Intro to Cypher
 
Django and Neo4j - Domain modeling that kicks ass
Django and Neo4j - Domain modeling that kicks assDjango and Neo4j - Domain modeling that kicks ass
Django and Neo4j - Domain modeling that kicks ass
 

Ähnlich wie Getting started with Graph Databases & Neo4j

No sql database and python -- Presentation done at Python Developer's meetup ...
No sql database and python -- Presentation done at Python Developer's meetup ...No sql database and python -- Presentation done at Python Developer's meetup ...
No sql database and python -- Presentation done at Python Developer's meetup ...Roshan Bhandari
 
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...Neo4j
 
DubJug: Neo4J and Open Data
DubJug: Neo4J and Open DataDubJug: Neo4J and Open Data
DubJug: Neo4J and Open DataScott Sosna
 
Polyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4jPolyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4jCorie Pollock
 
GraphQL is actually rest
GraphQL is actually restGraphQL is actually rest
GraphQL is actually restJakub Riedl
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryNeo4j
 
AI from your data lake: Using Solr for analytics
AI from your data lake: Using Solr for analyticsAI from your data lake: Using Solr for analytics
AI from your data lake: Using Solr for analyticsDataWorks Summit
 
GR8Conf 2011: Neo4j Plugin
GR8Conf 2011: Neo4j PluginGR8Conf 2011: Neo4j Plugin
GR8Conf 2011: Neo4j PluginGR8Conf
 
Metadata and Access Control
Metadata and Access ControlMetadata and Access Control
Metadata and Access ControlNeo4j
 
A quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesA quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesNicholas Crouch
 
Interpreting Relational Schema to Graphs
Interpreting Relational Schema to GraphsInterpreting Relational Schema to Graphs
Interpreting Relational Schema to GraphsNeo4j
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBApaichon Punopas
 
Mongodb open data day 2014
Mongodb open data day 2014Mongodb open data day 2014
Mongodb open data day 2014David Green
 
Graph database
Graph databaseGraph database
Graph databaseYen Pham
 

Ähnlich wie Getting started with Graph Databases & Neo4j (20)

Neo4j graph database
Neo4j graph databaseNeo4j graph database
Neo4j graph database
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
No sql database and python -- Presentation done at Python Developer's meetup ...
No sql database and python -- Presentation done at Python Developer's meetup ...No sql database and python -- Presentation done at Python Developer's meetup ...
No sql database and python -- Presentation done at Python Developer's meetup ...
 
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
 
Neo4j: Graph-like power
Neo4j: Graph-like powerNeo4j: Graph-like power
Neo4j: Graph-like power
 
DubJug: Neo4J and Open Data
DubJug: Neo4J and Open DataDubJug: Neo4J and Open Data
DubJug: Neo4J and Open Data
 
Polyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4jPolyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4j
 
GraphQL is actually rest
GraphQL is actually restGraphQL is actually rest
GraphQL is actually rest
 
Neo4j Davide Francesconi
Neo4j Davide FrancesconiNeo4j Davide Francesconi
Neo4j Davide Francesconi
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL Library
 
AI from your data lake: Using Solr for analytics
AI from your data lake: Using Solr for analyticsAI from your data lake: Using Solr for analytics
AI from your data lake: Using Solr for analytics
 
GR8Conf 2011: Neo4j Plugin
GR8Conf 2011: Neo4j PluginGR8Conf 2011: Neo4j Plugin
GR8Conf 2011: Neo4j Plugin
 
Grails and Neo4j
Grails and Neo4jGrails and Neo4j
Grails and Neo4j
 
Metadata and Access Control
Metadata and Access ControlMetadata and Access Control
Metadata and Access Control
 
A quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesA quick review of Python and Graph Databases
A quick review of Python and Graph Databases
 
Interpreting Relational Schema to Graphs
Interpreting Relational Schema to GraphsInterpreting Relational Schema to Graphs
Interpreting Relational Schema to Graphs
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
Mongodb open data day 2014
Mongodb open data day 2014Mongodb open data day 2014
Mongodb open data day 2014
 
Graph database
Graph databaseGraph database
Graph database
 
Graph Databases
Graph DatabasesGraph Databases
Graph Databases
 

Kürzlich hochgeladen

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Kürzlich hochgeladen (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Getting started with Graph Databases & Neo4j

  • 1. Getting started with Graph Databases & Neo4j Suroor Wijdan @wotthetech
  • 2. Agenda for Today ● Intro to Graph Databases ● Who is using graph databases? ● What is Neo4j? ● MongoDB vs Neo4j? ● Nodes and Relationships ● Cypher Query Language ● CRUD operations in CQL ● Project Use Case ● Questions? ● Exercises
  • 3. What is NoSQL? ● NoSQL stands for “Not Only SQL” ● Some questions which you can ask to database: ○ What is my Average Income? ○ What Items I have in his Shopping Cart? ○ How did I get into this session? - Ask a RDBMS - Ask a Key Value Store - Ask a Graph
  • 4. Intro to Graph Databases Graph is everywhere ● Graph Databases present a new perspective on the same type of data. ● Graph is the most generic type of data structure capable of storing data in highly accessible way ● Suitable for any kind of data that is related ● Graph databases are optimized for the relations between records ● a graph containing Nodes & Relationships ● with both having Properties ● verily perfect for complex and highly connected data Important Quote
  • 5. A Quote.... “A relational database may tell you how much your customer has spent at your store” “but” “a graph database will tell your customers what should they buy next”
  • 6. Who is using Graph Databases? ● Some big names using Graph Databases: ○ Facebook - Open Graph Database ○ Google - Knowledge Graph ○ Twitter - FlockDB distributed graph Database ○ Adobe ○ Glassdoor ○ JustDial ○ CareerBuilder ○ Indiatimes ○ telenor ○ Hellwet Packard ○ T-Mobile ○ Cisco ALL THESE USE
  • 7. What is Neo4j? ● Neo4j is a robust property graph database ● Fully Transactional (ACID) ● Highly Agile ● Best suited for data which is highly connected ● Is supremely fast when it comes to querying connected data ● The most popular graph database in the world ● Highly scalable, up to several billion nodes/relationships/properties
  • 8. What is Neo4j? ● Neo4j allows infinite depth ● Uses Cypher Query Language for querying, also has Java and REST API’s ● Human Readable Queries ● Data Modelling in Neo4j : ○ The whole model relies on the questions we have to ask our database ○ Very easily done, even when designing domains in SQL we tend to make graphs on whiteboards ● Neo4j helps us derive patterns from our data
  • 9. MongoDB vs Neo4j MongoDB is meant for cases where you would like to have dynamic queries on quite a size of data. - Not capable of handling relationships Neo4j is best suitable in use cases where you have complex relationships and data which is highly connected. Neo4j can help you find routes, social patterns, etc. from your data. - Not Horizontally Scalable (as of now)
  • 10. Nodes and Relationships ● A minimal graph can consist of a single node with properties defined on it. ● A Property graph has Nodes and Relationships with properties defined on them. ● node ( vertex) ● relationship (edge) :- with direction ● property(attribute) :- on nodes and relationships Lets see an example: -
  • 11. Nodes and Relationships Da Vinci Code Dan Brown Manoj Roni The Lost Symbol Gone with the Wind Suspense Thriller
  • 12. Nodes and Relationships Da Vinci Code Dan Brown Manoj Roni The Lost Symbol Harry Potter Suspense Thriller Authored By Read By Friendswith Authored By Recommends Belongs To BelongsTo Belongs To Release Date Recom m ends J.K Rowling Authored By An Example of Book Store with Recommendations
  • 13. Cypher Query Language ● Is a declarative query language for querying Neo4j ● Expressive and Human readable syntax ● Matches patterns of nodes and relationships to extract/modify information in the graph ● With cypher, we can create, update, remove nodes, relationships and properties ● Has an online console at http://www.neo4j. org/console ● Has a short learning curve due to similarities with SQL query statements
  • 14. Cypher Query Language Create a Node: CREATE (n:User { fname:"Manoj", lname:“Nama” }); ● User is the Label ● n is the variable for new node ● {} brackets to add properties to the node
  • 15. Cypher Query Language Read Properties of a Node: MATCH (n:User) WHERE n.fname = “Manoj” RETURN n ● User is the Label ● n is the variable for node ● WHERE to restrict the result to our criteria ● RETURN the properties on the node
  • 16. Cypher Query Language Update property on a Node: MATCH (user:User) WHERE user.fname = 'Manoj' SET user.lname = ‘Mohan’ RETURN user.fname, user.lname; ● User is the Label ● Restricts search to the nodes under USER label ● SET adds a new property to the node ● RETURN clause indicates what data to return
  • 17. Cypher Query Language Delete a Node: MATCH (user:User) WHERE user.fname = 'Emily' DELETE user ● User is the Label ● Restricts search to the nodes under USER label ● DELETE clause deletes a node from graph ● RETURN clause indicates what data to return
  • 18. Cypher Query Language Set a new property on a Node after creation: MATCH (user:User) WHERE user.name = 'Roni' SET user.country = ‘India’ RETURN user.name, user.country; ● User is the Label ● Restricts search to the nodes under USER label ● SET adds or updates a property on a node ● RETURN clause indicates what data to return
  • 19. Cypher Query Language Find a node in CQL START n=node(*) WHERE HAS (n.name) AND n.name = "Roni" RETURN n; ● START clause to begin a query ● n=node(*) to search through all nodes ● WHERE clause to constrain the results ● n.name indicates the name property must exist ● = "Roni" compares an existing name to the value Roni ● RETURN clause requests particular results
  • 20. Steps to get a Neo4j server up & running (Linux) Run the following commands in Terminal: ● sudo bash ● wget -O - http://debian.neo4j. org/neotechnology.gpg.key | apt-key add - ● echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j. list ● apt-get install neo4j ● start neo4j server, available at http: //localhost:7474 of the machine neo4j start
  • 22. References 1. Online Manual - http://docs.neo4j.org/chunked/milestone/ 2. Online Cypher Console - http://console.neo4j.org 3. Cypher Cheat Sheet - http://docs.neo4j.org/refcard/1.9/ 4. Graph image taken from - http://www.neo4j.org
  • 23. THANKS! Get in touch for any queries : twitter: @wotthetech github: suroorwijdan PS: You are free to share this ppt but give due credit to the creator wherever used.