SlideShare a Scribd company logo
1 of 38
Introduction to Neo4j
World’s Leading Graph Database
What is Neo4j:
Neo4j is -
An open source
Schema-free
No SQL
Graph Database
Developer(s) Neo Technology
Initial release 2007; 9 years ago
Stable release 3.0.1 / May 6, 2016; 53 days ago
Written in Java
Operating system Cross-platform
Type Graph database
Website neo4j.com
https://en.wikipedia.org/wiki/Neo4j
Cypher Query Language:
CQL Stands for Cypher Query Language. Like Oracle Database has query language SQL, Neo4j has CQL as query language.
Neo4j CQL -
It is a query language for Neo4j Graph Database.
It is a declarative pattern-matching language.
It follows SQL like syntax.
It is syntax is very simple and human readable format.
Like Oracle SQL -
Neo4j CQL has commands to perform Database operations.
Neo4j CQL supports many clauses like WHERE, ORDER BY etc., to write very complex queries in very easy manner.
Neo4j CQL supports some functions like String, Aggregation.In addition to them, it also supports some Relationship Functions.
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
CREATE clause:
Step 1 - Open Neo4j Data
Browser
Step 2 -Type the below command at
dollar prompt in Data Browser.
CREATE (emp:Employee)
Step 3 -Click on Execute button and see
the success message in the Data
Browser.
CREATE clause:
Step 1 - Open Neo4j Data Browser
Step 2 -Type the below command
at dollar prompt in Data Browser.
CREATE (emp:Employee)
Step 3 -Click on Execute button and see
the success message in the Data
Browser.
CREATE clause:
Step 1 - Open Neo4j Data Browser.
Step 2 -Type the below command at
dollar prompt in Data Browser.
CREATE (emp:Employee)
Step 3 -Click on Execute button
and see the success message in the Data
Browser.
CREATE clause:
CREATE A Node With
Properties:
Step 1 -Type the below command
at dollar prompt in Data
Browser.
CREATE (
<node-name>:<label-name>
{
<Property1-name>:<Property1-Value>
........
<Propertyn-name>:<Propertyn-Value>
}
)
Step 2 -Click on Execute button and see
the success message in the Data
CREATE clause:
CREATE A Node with
Properties:
Step 1 -Type the below command at
dollar prompt in Data Browser.
CREATE (
<node-name>:<label-name>
{
<Property1-name>:<Property1-Value>
........
<Propertyn-name>:<Propertyn-Value>
}
)
Step 2 -Click on Execute button
and see the success message in the Data
Browser.
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
MATCH and RETURN clause:
Step 1 - Type the below command at
dollar prompt in Data Browser.
MATCH
(
<node-name>:<label-name>
)
RETURN
<node-name>.<property1-name>,
...
<node-name>.<propertyn-name>
Step 2 - Click on Execute button and see the
success message in the Data Browser.
MATCH and RETURN clause:
Step 1 - Type the below command at
dollar prompt in Data Browser.
MATCH
(
<node-name>:<label-name>
)
RETURN
<node-name>.<property1-name>,
...
<node-name>.<propertyn-name>
Step 2 - Click on Execute button and
see the success message in the Data
Browser.
MATCH and RETURN clause:
To retrieve all
properties(deptno,dname,location)
data of Dept Node from Database:
MATCH (dept: Dept)
RETURN
dept.deptno,dept.dname,dept.location
MATCH and RETURN clause:
To retrieve all
properties(deptno,dname,location)
data of Dept Node from Database:
MATCH (dept: Dept)
RETURN
dept.deptno,dept.dname,dept.location
CLick on Execute button.
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
WHERE clause:
MATCH (emp:Employee)
RETURN emp.empid,emp.name,emp.salary,emp.deptno
WHERE clause:
MATCH (emp:Employee)
RETURN emp.empid,emp.name,emp.salary,emp.deptno
Click on "Execute" button and observe
the results.
WHERE clause:
MATCH (emp:Employee) WHERE emp.name = 'Abc’
RETURN emp.empid,emp.name,emp.salary,emp.deptno
WHERE clause:
MATCH (emp:Employee) WHERE emp.name = 'Abc’
RETURN emp.empid,emp.name,emp.salary,emp.deptno
Click on "Execute" button and
observe the results.
Relationship Basics
Relationships:
CREATE (e:Customer{id:"1001",name:"Abc",dob:"01/10/1982"})
Relationships:
CREATE (e:Customer{id:"1001",name:"Abc",dob:"01/10/1982"})
CREATE (cc:CreditCard{id:"5001",number:"1234567890",cvv:"888",expiredate:"20/17"})
Relationships:
CREATE (e:Customer{id:"1001",name:"Abc",dob:"01/10/1982"})
CREATE (cc:CreditCard{id:"5001",number:"1234567890",cvv:"888",expiredate:"20/17"})
MATCH (cust:Customer),(cc:CreditCard)
CREATE (cust)-[r:DO_SHOPPING_WITH{shopdate:"12/12/2014",price:55000}]->(cc)
RETURN r
Relationships:
MATCH (cust:Customer),(cc:CreditCard)
CREATE (cust)-[r:DO_SHOPPING_WITH{shopdate:"12/12/2014",price:55000}]->(cc)
RETURN r
Click on "Execute"
button
Relationships:
MATCH (cust:Customer),(cc:CreditCard)
CREATE (cust)-[r:DO_SHOPPING_WITH{shopdate:"12/12/2014",price:55000}]->(cc)
RETURN r
Click on Relationship arrow
mark to view its properties.
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
DELETE clause:
MATCH (cc: CreditCard)-[rel]-(c:Customer)
DELETE cc,c,rel
DELETE clause:
MATCH (cc: CreditCard)-[rel]-(c:Customer)
DELETE cc,c,rel
Click on "Execute" button and
observe the results.
CQL
Command/Clause:
CREATE
MATCH
RETURN
WHERE
DELETE
SET
SET clause:
<node-label-name>.<property1-name>,
<node-label-name>.<property2-name>,
....
<node-label-name>.<propertyn-name>
SET clause:
<node-label-name>.<property1-name>,
<node-label-name>.<property2-name>,
....
<node-label-name>.<propertyn-name>
MATCH (dc:DebitCard)
SET dc.atm_pin = 3456
RETURN dc
SET clause:
<node-label-name>.<property1-name>,
<node-label-name>.<property2-name>,
....
<node-label-name>.<propertyn-name>
MATCH (dc:DebitCard)
SET dc.atm_pin = 3456
RETURN dc
SET clause:
<node-label-name>.<property1-name>,
<node-label-name>.<property2-name>,
....
<node-label-name>.<propertyn-name>
MATCH (dc:DebitCard)
SET dc.atm_pin = 3456
RETURN dc
Click on "Execute" button and
observe the results.
Who’s using Neo4j??
From Global 500 companies to startups,
Neo4j Powers Innovative Solutions Across
a Wide Range of Industries.
http://neo4j.com/customers
http://neo4j.com/customers
Thank
You!
I hope this introduction will be helpful for you
to learn Neo4j.
For more information about neo4j, go to
Neo4j.com

More Related Content

Similar to Neo4j

Creating master and work repository
Creating master and work repositoryCreating master and work repository
Creating master and work repository
Ravi Kumar Lanke
 
Practicas oracle10g
Practicas oracle10gPracticas oracle10g
Practicas oracle10g
rehoscript
 
Spark SQL - 10 Things You Need to Know
Spark SQL - 10 Things You Need to KnowSpark SQL - 10 Things You Need to Know
Spark SQL - 10 Things You Need to Know
Kristian Alexander
 
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
Michael Rosenblum
 

Similar to Neo4j (20)

Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data Modeler
 
Creating master and work repository
Creating master and work repositoryCreating master and work repository
Creating master and work repository
 
New and improved hacking oracle from web apps sumit sidharth
New and improved hacking oracle from web apps   sumit sidharthNew and improved hacking oracle from web apps   sumit sidharth
New and improved hacking oracle from web apps sumit sidharth
 
Practicas oracle10g
Practicas oracle10gPracticas oracle10g
Practicas oracle10g
 
ALL NEW OOP 2014
ALL NEW OOP 2014ALL NEW OOP 2014
ALL NEW OOP 2014
 
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Spark SQL - 10 Things You Need to Know
Spark SQL - 10 Things You Need to KnowSpark SQL - 10 Things You Need to Know
Spark SQL - 10 Things You Need to Know
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12c
 
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...
 
154090896 installation-of-oracle-database-12c
154090896 installation-of-oracle-database-12c154090896 installation-of-oracle-database-12c
154090896 installation-of-oracle-database-12c
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Json within a relational database
Json within a relational databaseJson within a relational database
Json within a relational database
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
 
tutorialSCE
tutorialSCEtutorialSCE
tutorialSCE
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Advanced SQL - Database Access from Programming Languages
Advanced SQL - Database Access  from Programming LanguagesAdvanced SQL - Database Access  from Programming Languages
Advanced SQL - Database Access from Programming Languages
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 

Neo4j