SlideShare a Scribd company logo
1 of 18
Download to read offline
Cafeteria rating
Presented by
Bibhuti Regmi
Graph database
Neo4j
● Neo4j is an open-source, NoSQL, native graph database that provides an
ACID-compliant transactional backend for your applications.
● referred to as a native graph database because it efficiently implements the
property graph model down to the storage level.
● It is highly scalable and schema-free.
● It's world most popular graph database management system.
● Neo4j is implemented in Java language and it can be accessed by other
language using Cypher Query Language (CQL) through a transactional HTTP
endpoint.
● The database uses pointers to navigate and traverse the graph.
Use cases
● Fraud detection and analytics
● Network and database infrastructure monitoring
● Recommendation engines
● Social networks
● Knowledge graph
● Identity and access management
● Privacy and risk compliance
● Master data management
Over 300 commercial customers and over 750 startups use Neo4j.
Flagship customers include eBay, Walmart, Cisco, Citibank, ING, UBS, HP,
Microsoft, IBM, Thomson Reuters, Amadeus Travel, Caterpillar, Volvo and many
more.
Project implementation
Sample queries: Cafeteria Rating
Step 1. Create a node: Stall
● CREATE (a:Stall {Name: "Western food", description: "Get varieties of western food
here", location: "SU Snack Bar"})
return a
Similarly create nodes:
● Menu
● Review
● Customer
Step 2: Creating relationship between nodes
Creating relation between Customer and stall
Match(c:Customer),(b:Stall)
where c.name="Bibhuti Regmi" and b.Name="Nepalese food"
Create (c)-[r:Reviewed]->(b)
Return r
Retrieve a node
MATCH (c:Customer {name: "Bibhuti Regmi"})
RETURN p
is equivalent to
SELECT * FROM Customer
WHERE name = "Bibhuti Regmi";
Update
MATCH (n)
WHERE n.name = "Bibhuti Regmi"
SET n.age = "16"
MATCH (n:Customer)
{Name: "Bibhuti Regmi"})
Delete n
Delete
Functionality
➢ A platform to view cafeteria’s
○ Stall ratings and comments on each stall.
○ Menu
➢ Build a platform to share their rating with other
customers and also with the stall owners through which
they can know their pros and cons.
➢ Get recommendation on which stall to eat
Analysis Queries in NEO4j
1. Check all the ratings provided by a particular customer
MATCH (c:Customer)-[:Reviewed]->(s:Stall),
(c)-[:gaveReview]->(r:Review)
WHERE c.name='George Miller'
RETURN c,r,s
2. Displaying nationality of customers who provided rating to a particular stall
Match (cus:Customer)-[:Reviewed]->(s:Stall)
where s.Name="Nepalese food"
Return cus.nationality,count(*)
Fig: Ratings provided by George
Output of query 2
continued..
3. View Avg Rating of stall based on categories and average rating of each category
MATCH (s:Stall)-[:HasReview]->(n:Review)
RETURN s,avg(n.taste) as avgtaste, avg(n.behaviour) as avgbehaviour,avg(n.affordability) as avgaffordability,
avg(n.availability)as avgavialability,avg(n.hygiene) as
avghygiene,avg((n.taste+n.affordability+n.availability+n.behaviour+n.hygiene)/5) as reviewfinal
● View the ratings for different stalls in cafeteria or snack bar.
● Know the rating which other customers have given based on the categories such as
taste or hygiene and so on.
● Share experiences in the form of comments or ratings
Implemented Using RDBMS
Additional Implementation using Neo4j
● Get recommendation on which stall to eat(Based on nationality and rating)
Use case: Recommendation system
Neo4j is used in recommendation system. So as an extension of our project
cafeteria rating, I added a new functionality that would suit this data model:-
recommending stalls to user based on nationality and rating of the stall.
For simplicity purpose I have just implemented nationality as a recommendation
parameter.
Eg: If a student is Nepali, then the stalls visited by nepali people and have given
good rating will be recommended. A portion of this is implemented.
Fig: Table involved in project using RDBMS Fig: Neo4j equivalent
RDBMS Neo4j
RDBMS
select s.stall_name, m.description from
stall s
Inner join review r
On s.st_id = r.stall_id
Inner join Givesreview gr
On r.r_id=g.r_id
Inner join customer c
On gr.c_id = c.c_id
Inner join menu m
on s.stall_id=m.stall_id
Where
(r.taste+r.affordability+r.availability+r.
.behaviour+r.hygiene)/5)>3
And c.nationality=’Nepalese’)
NEO4J
MATCH (cus:Customer)-[:Reviewed]->(s:Stall),
(s)-[:HasMenu]-(m:Menu),
(cus)-[:gaveReview]->(n:Review)
WITH s, m, cus,
(n.taste+n.affordability+n.availability+n.behaviour+n.hygiene)/5
as reviewfinal
WHERE cus.nationality='Nepali'
and reviewfinal>3
RETURN s,m,count(cus) as customernumber
ORDER BY customernumber desc
Displaying stalls visited by nepali people and have given good rating
Displaying stalls visited by nepali people and have
given good rating
Match (cus:Customer)-[:Reviewed]->(s:Stall),
(s)-[:HasMenu]-(m:Menu),
(cus)-[:gaveReview]->(n:Review)
With s, m, cus,
(n.taste+n.affordability+n.availability+n.behaviour
+n.hygiene)/5 as reviewfinal
where cus.nationality='Nepali'
and reviewfinal>3
Return s,m,count(cus) as customernumber
order by customernumber desc Fig: Output of the Query
Relational vs Graph
Thank you

More Related Content

Similar to Neo4j implementation (Part 2)

Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015Johann de Boer
 
Presented at useR! 2010
Presented at useR! 2010Presented at useR! 2010
Presented at useR! 2010weianiu
 
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...Databricks
 
Alleman coonce-agile-2017 may2
Alleman coonce-agile-2017 may2Alleman coonce-agile-2017 may2
Alleman coonce-agile-2017 may2Glen Alleman
 
SUG Bangalore - Marketing Automation by Aji Viswanadhan
SUG Bangalore - Marketing Automation by Aji ViswanadhanSUG Bangalore - Marketing Automation by Aji Viswanadhan
SUG Bangalore - Marketing Automation by Aji ViswanadhanAnindita Bhattacharya
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0Neo4j
 
IRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price PromotionIRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price PromotionIRJET Journal
 
Using modeling tools data profiling powerdesigner data solutions de spirlet
Using modeling tools  data profiling powerdesigner data solutions de spirletUsing modeling tools  data profiling powerdesigner data solutions de spirlet
Using modeling tools data profiling powerdesigner data solutions de spirletThierry de Spirlet
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Ruby Meditation
 
How to Start Preparation for ServiceNow CAS-PA Certification Exam?
How to Start Preparation for ServiceNow CAS-PA Certification Exam?How to Start Preparation for ServiceNow CAS-PA Certification Exam?
How to Start Preparation for ServiceNow CAS-PA Certification Exam?Meghna Arora
 
Android Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and PatternsAndroid Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and PatternsAdham Enaya
 
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesRevolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesPhilip Goddard
 
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...Chris Goward
 
[Sample Question] Pega Business Architect (CPBA) Exam
[Sample Question] Pega Business Architect (CPBA) Exam[Sample Question] Pega Business Architect (CPBA) Exam
[Sample Question] Pega Business Architect (CPBA) ExamMeghna Arora
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App PresentationElizabeth Long
 

Similar to Neo4j implementation (Part 2) (20)

Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015
 
Dixon lau pm-concept
Dixon lau pm-conceptDixon lau pm-concept
Dixon lau pm-concept
 
Presented at useR! 2010
Presented at useR! 2010Presented at useR! 2010
Presented at useR! 2010
 
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...
Yelp Ad Targeting at Scale with Apache Spark with Inaz Alaei-Novin and Joe Ma...
 
Alleman coonce-agile-2017 may2
Alleman coonce-agile-2017 may2Alleman coonce-agile-2017 may2
Alleman coonce-agile-2017 may2
 
SUG Bangalore - Marketing Automation by Aji Viswanadhan
SUG Bangalore - Marketing Automation by Aji ViswanadhanSUG Bangalore - Marketing Automation by Aji Viswanadhan
SUG Bangalore - Marketing Automation by Aji Viswanadhan
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0
 
IRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price PromotionIRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
 
Using modeling tools data profiling powerdesigner data solutions de spirlet
Using modeling tools  data profiling powerdesigner data solutions de spirletUsing modeling tools  data profiling powerdesigner data solutions de spirlet
Using modeling tools data profiling powerdesigner data solutions de spirlet
 
CAS-PA Exam Dumps
CAS-PA Exam DumpsCAS-PA Exam Dumps
CAS-PA Exam Dumps
 
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
 
Asp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTechAsp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTech
 
How to Start Preparation for ServiceNow CAS-PA Certification Exam?
How to Start Preparation for ServiceNow CAS-PA Certification Exam?How to Start Preparation for ServiceNow CAS-PA Certification Exam?
How to Start Preparation for ServiceNow CAS-PA Certification Exam?
 
Android Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and PatternsAndroid Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and Patterns
 
Nazeer Resume
Nazeer ResumeNazeer Resume
Nazeer Resume
 
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesRevolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
 
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
 
v-kreta_Overview
v-kreta_Overviewv-kreta_Overview
v-kreta_Overview
 
[Sample Question] Pega Business Architect (CPBA) Exam
[Sample Question] Pega Business Architect (CPBA) Exam[Sample Question] Pega Business Architect (CPBA) Exam
[Sample Question] Pega Business Architect (CPBA) Exam
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App Presentation
 

Recently uploaded

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...Health
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...SOFTTECHHUB
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabiaahmedjiabur940
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...HyderabadDolls
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfSayantanBiswas37
 
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
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 

Recently uploaded (20)

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
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
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 

Neo4j implementation (Part 2)

  • 2. Neo4j ● Neo4j is an open-source, NoSQL, native graph database that provides an ACID-compliant transactional backend for your applications. ● referred to as a native graph database because it efficiently implements the property graph model down to the storage level. ● It is highly scalable and schema-free. ● It's world most popular graph database management system. ● Neo4j is implemented in Java language and it can be accessed by other language using Cypher Query Language (CQL) through a transactional HTTP endpoint. ● The database uses pointers to navigate and traverse the graph.
  • 3. Use cases ● Fraud detection and analytics ● Network and database infrastructure monitoring ● Recommendation engines ● Social networks ● Knowledge graph ● Identity and access management ● Privacy and risk compliance ● Master data management Over 300 commercial customers and over 750 startups use Neo4j. Flagship customers include eBay, Walmart, Cisco, Citibank, ING, UBS, HP, Microsoft, IBM, Thomson Reuters, Amadeus Travel, Caterpillar, Volvo and many more.
  • 5. Sample queries: Cafeteria Rating Step 1. Create a node: Stall ● CREATE (a:Stall {Name: "Western food", description: "Get varieties of western food here", location: "SU Snack Bar"}) return a Similarly create nodes: ● Menu ● Review ● Customer
  • 6. Step 2: Creating relationship between nodes Creating relation between Customer and stall Match(c:Customer),(b:Stall) where c.name="Bibhuti Regmi" and b.Name="Nepalese food" Create (c)-[r:Reviewed]->(b) Return r
  • 7. Retrieve a node MATCH (c:Customer {name: "Bibhuti Regmi"}) RETURN p is equivalent to SELECT * FROM Customer WHERE name = "Bibhuti Regmi";
  • 8. Update MATCH (n) WHERE n.name = "Bibhuti Regmi" SET n.age = "16" MATCH (n:Customer) {Name: "Bibhuti Regmi"}) Delete n Delete
  • 9. Functionality ➢ A platform to view cafeteria’s ○ Stall ratings and comments on each stall. ○ Menu ➢ Build a platform to share their rating with other customers and also with the stall owners through which they can know their pros and cons. ➢ Get recommendation on which stall to eat
  • 10. Analysis Queries in NEO4j 1. Check all the ratings provided by a particular customer MATCH (c:Customer)-[:Reviewed]->(s:Stall), (c)-[:gaveReview]->(r:Review) WHERE c.name='George Miller' RETURN c,r,s 2. Displaying nationality of customers who provided rating to a particular stall Match (cus:Customer)-[:Reviewed]->(s:Stall) where s.Name="Nepalese food" Return cus.nationality,count(*) Fig: Ratings provided by George Output of query 2
  • 11. continued.. 3. View Avg Rating of stall based on categories and average rating of each category MATCH (s:Stall)-[:HasReview]->(n:Review) RETURN s,avg(n.taste) as avgtaste, avg(n.behaviour) as avgbehaviour,avg(n.affordability) as avgaffordability, avg(n.availability)as avgavialability,avg(n.hygiene) as avghygiene,avg((n.taste+n.affordability+n.availability+n.behaviour+n.hygiene)/5) as reviewfinal
  • 12. ● View the ratings for different stalls in cafeteria or snack bar. ● Know the rating which other customers have given based on the categories such as taste or hygiene and so on. ● Share experiences in the form of comments or ratings Implemented Using RDBMS Additional Implementation using Neo4j ● Get recommendation on which stall to eat(Based on nationality and rating)
  • 13. Use case: Recommendation system Neo4j is used in recommendation system. So as an extension of our project cafeteria rating, I added a new functionality that would suit this data model:- recommending stalls to user based on nationality and rating of the stall. For simplicity purpose I have just implemented nationality as a recommendation parameter. Eg: If a student is Nepali, then the stalls visited by nepali people and have given good rating will be recommended. A portion of this is implemented.
  • 14. Fig: Table involved in project using RDBMS Fig: Neo4j equivalent RDBMS Neo4j
  • 15. RDBMS select s.stall_name, m.description from stall s Inner join review r On s.st_id = r.stall_id Inner join Givesreview gr On r.r_id=g.r_id Inner join customer c On gr.c_id = c.c_id Inner join menu m on s.stall_id=m.stall_id Where (r.taste+r.affordability+r.availability+r. .behaviour+r.hygiene)/5)>3 And c.nationality=’Nepalese’) NEO4J MATCH (cus:Customer)-[:Reviewed]->(s:Stall), (s)-[:HasMenu]-(m:Menu), (cus)-[:gaveReview]->(n:Review) WITH s, m, cus, (n.taste+n.affordability+n.availability+n.behaviour+n.hygiene)/5 as reviewfinal WHERE cus.nationality='Nepali' and reviewfinal>3 RETURN s,m,count(cus) as customernumber ORDER BY customernumber desc Displaying stalls visited by nepali people and have given good rating
  • 16. Displaying stalls visited by nepali people and have given good rating Match (cus:Customer)-[:Reviewed]->(s:Stall), (s)-[:HasMenu]-(m:Menu), (cus)-[:gaveReview]->(n:Review) With s, m, cus, (n.taste+n.affordability+n.availability+n.behaviour +n.hygiene)/5 as reviewfinal where cus.nationality='Nepali' and reviewfinal>3 Return s,m,count(cus) as customernumber order by customernumber desc Fig: Output of the Query