SlideShare a Scribd company logo
1 of 43
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Getting Started with
Graph Databases
a Devoxx France tools-in-action session
@Lauren_Schaefer
1
#DevoxxFR #IntroToGraph @Lauren_Schaefer
The plan
• What are graph databases and why should you care?
• Schema diagrams
• CRUD!
• Recommendation engines
#DevoxxFR #IntroToGraph @Lauren_Schaefer
What are graph databases?
#DevoxxFR #IntroToGraph @Lauren_Schaefer
What are graph databases?
• NoSQL
• Focus on relationships
• Nodes and edges instead of tables
#DevoxxFR #IntroToGraph @Lauren_Schaefer
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Creative Commons: https://www.flickr.com/photos/hjl/4094315135/
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you make a graph?
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you make a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you make a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you make a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
Properties
Key: value
Properties
Key: value
Properties
Key: value
Properties
Key: value
Properties
Key: value
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you traverse a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you traverse a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you traverse a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you traverse a graph?
Node
(noun)
Node
(noun)
Node
(noun)
Node
(noun)Edge (Verb)
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Should you care about graph
databases?
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Graph databases are massively increasing
in popularity
http://db-engines.com/en/ranking_categories
#DevoxxFR #IntroToGraph @Lauren_Schaefer
People
People who viewed this item ultimately bought…
Blue pool float Red wagon
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Places
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Things
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Fraud
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Many more use cases
• Modeling social networks
• Diagnosing psychosis with word analysis
• Analyzing the spread of epidemics
• Modeling a bio network
• Visualizing a social/economic/political network
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Let’s try a graph database
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you create a schema
diagram for a graph?
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Lauren’s Lovely Landscapes
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Lauren’s Lovely Landscapes
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Lauren’s Lovely Landscapes
#DevoxxFR #IntroToGraph @Lauren_Schaefer
1. Model the nouns and verbs
printuser
buys
#DevoxxFR #IntroToGraph @Lauren_Schaefer
2. Define vertices and edges
label: printlabel: user
label: buys
#DevoxxFR #IntroToGraph @Lauren_Schaefer
3. Define the multiplicity
label: printlabel: user
label: buys
MULTI
#DevoxxFR #IntroToGraph @Lauren_Schaefer
4. Add properties
label: print
type: print
name: string
description: string
price: float
imgPath: string
label: user
type: user
firstName: string
lastName: string
username: string
email: string
label: buys
datetime: string
address1: string
address2: string
city: string
state: string
zip: integer
paymentMethod: string
MULTI
#DevoxxFR #IntroToGraph @Lauren_Schaefer
5. Create indexes
label: print
type: print
name: string
description: string
price: float
imgPath: string
label: user
type: user
firstName: string
lastName: string
username: string
email: string
label: buys
datetime: string
address1: string
address2: string
city: string
state: string
zip: integer
paymentMethod: string
MULTI
Vertex Indexes:
userByName: [firstName, lastName], mixed, not unique, indexOnly (user)
userByUsername: [username], composite, unique, indexOnly (user)
printByName: [name], composite, unique, indexOnly (print)
vByPrice: [price], mixed, not unique
#DevoxxFR #IntroToGraph @Lauren_Schaefer
CRUD!
#DevoxxFR #IntroToGraph @Lauren_Schaefer
CRUD! Live demo!
label: print
type: print
name: string
description: string
price: float
imgPath: string
label: user
type: user
firstName: string
lastName: string
username: string
email: string
label: buys
datetime: string
address1: string
address2: string
city: string
state: string
zip: integer
paymentMethod: string
MULTI
#DevoxxFR #IntroToGraph @Lauren_Schaefer
How do you create a
recommendation engine?
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Generating recommendations
#DevoxxFR #IntroToGraph @Lauren_Schaefer
TinkerPop recipe
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Recommendations for Dale
Alaska
Antarctica
Las
Vegas
Australia
Japan
Jason
Joy
Deanna
Dale
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Recommendations for Dale
Alaska
Antarctica
Las
Vegas
Australia
Japan
Jason
Joy
Deanna
Dale
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Recommendations for Dale
Alaska
Antarctica
Las
Vegas
Australia
Japan
Jason
Joy
Deanna
Dale
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Recommendations for Dale
Alaska
Antarctica
Las
Vegas
Australia
Japan
Jason
Joy
Deanna
Dale
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Recommendations for Dale
Alaska
Antarctica
Las
Vegas
Australia
Japan
Jason
Joy
Deanna
Dale
#DevoxxFR #IntroToGraph @Lauren_Schaefer
Live demo!
• Write Gremlin queries to generate recommendations
#DevoxxFR #IntroToGraph @Lauren_Schaefer
That’s all for now…
• To access the resources associated with this presentation…
- visit http://ibm.biz/devoxxfr_tia_slides
• To go deeper, attend my hands-on lab on Friday! (and tell your friends)
• To continue to learn more about Lauren, IBM Graph, and Bluemix, follow
@Lauren_Schaefer
@IBMGraph
@IBMBluemix

More Related Content

Viewers also liked

Large Scale Graph Processing with Apache Giraph
Large Scale Graph Processing with Apache GiraphLarge Scale Graph Processing with Apache Giraph
Large Scale Graph Processing with Apache Giraphsscdotopen
 
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?DMC, Inc.
 
102602994 wincc-course-ppt
102602994 wincc-course-ppt102602994 wincc-course-ppt
102602994 wincc-course-pptMrBundle JB
 
Applying large scale text analytics with graph databases
Applying large scale text analytics with graph databasesApplying large scale text analytics with graph databases
Applying large scale text analytics with graph databasesData Ninja API
 
Graph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataGraph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataMarko Rodriguez
 
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
 
Relational to Big Graph
Relational to Big GraphRelational to Big Graph
Relational to Big GraphNeo4j
 
CS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf bookCS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf bookappasami
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theoryTech_MX
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theoryChuckie Balbuena
 
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...craftworkz
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyIBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyOpenWhisk
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jTobias Lindaaker
 
Graph database super star
Graph database super starGraph database super star
Graph database super starandres_taylor
 
Agile Business Transformation
Agile Business TransformationAgile Business Transformation
Agile Business TransformationKevin Goldsmith
 

Viewers also liked (18)

Large Scale Graph Processing with Apache Giraph
Large Scale Graph Processing with Apache GiraphLarge Scale Graph Processing with Apache Giraph
Large Scale Graph Processing with Apache Giraph
 
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?
Improving and Scaling SCADA Systems: Is WinCC OA Right for Me?
 
Big Graph Data
Big Graph DataBig Graph Data
Big Graph Data
 
102602994 wincc-course-ppt
102602994 wincc-course-ppt102602994 wincc-course-ppt
102602994 wincc-course-ppt
 
SIEMENS PLC S7-300&WINCC COURSE
SIEMENS PLC S7-300&WINCC COURSESIEMENS PLC S7-300&WINCC COURSE
SIEMENS PLC S7-300&WINCC COURSE
 
Applying large scale text analytics with graph databases
Applying large scale text analytics with graph databasesApplying large scale text analytics with graph databases
Applying large scale text analytics with graph databases
 
Graph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of DataGraph Databases: Trends in the Web of Data
Graph Databases: Trends in the Web of Data
 
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
 
Relational to Big Graph
Relational to Big GraphRelational to Big Graph
Relational to Big Graph
 
CS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf bookCS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf book
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...
Craftworkz at InterConnect 2017 - Creating a Highly Scalable Chatbot in a Mic...
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyIBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4j
 
Graph database super star
Graph database super starGraph database super star
Graph database super star
 
Agile Business Transformation
Agile Business TransformationAgile Business Transformation
Agile Business Transformation
 

Similar to Getting Started with Graph Databases

Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...
Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...
Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...Neo4j
 
From Realtime to Isomorphic Dart
From Realtime to Isomorphic DartFrom Realtime to Isomorphic Dart
From Realtime to Isomorphic DartJoris Hermans
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web DesignClarissa Peterson
 
Le wagon UI & design crash course
Le wagon UI & design crash courseLe wagon UI & design crash course
Le wagon UI & design crash courseMathieu Le Roux
 
Big Data Analytics course: Named Entities and Deep Learning for NLP
Big Data Analytics course: Named Entities and Deep Learning for NLPBig Data Analytics course: Named Entities and Deep Learning for NLP
Big Data Analytics course: Named Entities and Deep Learning for NLPChristian Morbidoni
 
Desenhando a arquitetura do software!
Desenhando a arquitetura do software!Desenhando a arquitetura do software!
Desenhando a arquitetura do software!Isaac de Souza
 
Java EE, Micro-services, Typescript and Angular 4.x
Java EE, Micro-services, Typescript and Angular 4.xJava EE, Micro-services, Typescript and Angular 4.x
Java EE, Micro-services, Typescript and Angular 4.xSébastien Pertus
 
Word camp c bus 2016
Word camp c bus 2016Word camp c bus 2016
Word camp c bus 2016Bobby Bryant
 
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...Lauren Hayward Schaefer
 
Content Structure Workshop - Content Marketing World 2019
Content Structure Workshop - Content Marketing World 2019Content Structure Workshop - Content Marketing World 2019
Content Structure Workshop - Content Marketing World 2019Laura Creekmore
 
Le Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash CourseLe Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash CourseBoris Paillard
 
Designing for the Salesforce Platform
Designing for the Salesforce Platform Designing for the Salesforce Platform
Designing for the Salesforce Platform AaronRich1
 
F# for startups v2
F# for startups v2F# for startups v2
F# for startups v2joelgrus
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014Codemotion
 

Similar to Getting Started with Graph Databases (20)

Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...
Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...
Delegate, Automate, Dominate: Putting Graph Tech to Work for You to Unlock Hi...
 
Design Pattern Automation
Design Pattern AutomationDesign Pattern Automation
Design Pattern Automation
 
From Realtime to Isomorphic Dart
From Realtime to Isomorphic DartFrom Realtime to Isomorphic Dart
From Realtime to Isomorphic Dart
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Le wagon UI & design crash course
Le wagon UI & design crash courseLe wagon UI & design crash course
Le wagon UI & design crash course
 
Big Data Analytics course: Named Entities and Deep Learning for NLP
Big Data Analytics course: Named Entities and Deep Learning for NLPBig Data Analytics course: Named Entities and Deep Learning for NLP
Big Data Analytics course: Named Entities and Deep Learning for NLP
 
Desenhando a arquitetura do software!
Desenhando a arquitetura do software!Desenhando a arquitetura do software!
Desenhando a arquitetura do software!
 
A is for Angular
A is for AngularA is for Angular
A is for Angular
 
Java EE, Micro-services, Typescript and Angular 4.x
Java EE, Micro-services, Typescript and Angular 4.xJava EE, Micro-services, Typescript and Angular 4.x
Java EE, Micro-services, Typescript and Angular 4.x
 
Word camp c bus 2016
Word camp c bus 2016Word camp c bus 2016
Word camp c bus 2016
 
Denver topical homepages
Denver topical homepagesDenver topical homepages
Denver topical homepages
 
Flutter_ Basic Chat App UI.pptx
Flutter_ Basic Chat App UI.pptxFlutter_ Basic Chat App UI.pptx
Flutter_ Basic Chat App UI.pptx
 
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...
10 Best Practices for Writing Documentation (For Those Who Would Rather Do An...
 
Content Structure Workshop - Content Marketing World 2019
Content Structure Workshop - Content Marketing World 2019Content Structure Workshop - Content Marketing World 2019
Content Structure Workshop - Content Marketing World 2019
 
Le Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash CourseLe Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash Course
 
Designing for the Salesforce Platform
Designing for the Salesforce Platform Designing for the Salesforce Platform
Designing for the Salesforce Platform
 
Time to Good DX
Time to Good DXTime to Good DX
Time to Good DX
 
F# for startups v2
F# for startups v2F# for startups v2
F# for startups v2
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 

More from Lauren Hayward Schaefer

7 Ways to Build an API that Developers Will Hate
7 Ways to Build an API that Developers Will Hate7 Ways to Build an API that Developers Will Hate
7 Ways to Build an API that Developers Will HateLauren Hayward Schaefer
 
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...Lauren Hayward Schaefer
 
Intro to Technical Writing: Creating Content that Google and Readers will Love
Intro to Technical Writing: Creating Content that Google and Readers will LoveIntro to Technical Writing: Creating Content that Google and Readers will Love
Intro to Technical Writing: Creating Content that Google and Readers will LoveLauren Hayward Schaefer
 
Level Up Your Technical Career by Writing
Level Up Your Technical Career by WritingLevel Up Your Technical Career by Writing
Level Up Your Technical Career by WritingLauren Hayward Schaefer
 
5 Things I Learned While Modeling Data in MongoDB
5 Things I Learned While Modeling Data in MongoDB5 Things I Learned While Modeling Data in MongoDB
5 Things I Learned While Modeling Data in MongoDBLauren Hayward Schaefer
 
How to Raise Your Profile as a Developer (And Why You Should Bother!)
How to Raise Your Profile as a Developer (And Why You Should Bother!)How to Raise Your Profile as a Developer (And Why You Should Bother!)
How to Raise Your Profile as a Developer (And Why You Should Bother!)Lauren Hayward Schaefer
 
Building CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsBuilding CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsLauren Hayward Schaefer
 
From Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetFrom Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetLauren Hayward Schaefer
 
DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩Lauren Hayward Schaefer
 
Stop! Don't make these mistakes in your document database!
Stop! Don't make these mistakes in your document database!Stop! Don't make these mistakes in your document database!
Stop! Don't make these mistakes in your document database!Lauren Hayward Schaefer
 
From Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetFrom Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetLauren Hayward Schaefer
 
From Tables to Documents -- Changing Your Database Mindset
From Tables to Documents -- Changing Your Database MindsetFrom Tables to Documents -- Changing Your Database Mindset
From Tables to Documents -- Changing Your Database MindsetLauren Hayward Schaefer
 
Jumpstart! From SQL to NoSQL -- Changing Your Mindset
Jumpstart! From SQL to NoSQL -- Changing Your MindsetJumpstart! From SQL to NoSQL -- Changing Your Mindset
Jumpstart! From SQL to NoSQL -- Changing Your MindsetLauren Hayward Schaefer
 

More from Lauren Hayward Schaefer (20)

7 Ways to Build an API that Developers Will Hate
7 Ways to Build an API that Developers Will Hate7 Ways to Build an API that Developers Will Hate
7 Ways to Build an API that Developers Will Hate
 
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...
Developer Advocacy: A Career Path for Those With a Passion for Code, Communit...
 
Intro to Technical Writing: Creating Content that Google and Readers will Love
Intro to Technical Writing: Creating Content that Google and Readers will LoveIntro to Technical Writing: Creating Content that Google and Readers will Love
Intro to Technical Writing: Creating Content that Google and Readers will Love
 
Level Up Your Technical Career by Writing
Level Up Your Technical Career by WritingLevel Up Your Technical Career by Writing
Level Up Your Technical Career by Writing
 
How to Raise Your Profile Worksheet
How to Raise Your Profile WorksheetHow to Raise Your Profile Worksheet
How to Raise Your Profile Worksheet
 
5 Things I Learned While Modeling Data in MongoDB
5 Things I Learned While Modeling Data in MongoDB5 Things I Learned While Modeling Data in MongoDB
5 Things I Learned While Modeling Data in MongoDB
 
How to Raise Your Profile as a Developer (And Why You Should Bother!)
How to Raise Your Profile as a Developer (And Why You Should Bother!)How to Raise Your Profile as a Developer (And Why You Should Bother!)
How to Raise Your Profile as a Developer (And Why You Should Bother!)
 
Building CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsBuilding CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm Apps
 
From Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetFrom Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database Mindset
 
NoSQL for Startups
NoSQL for StartupsNoSQL for Startups
NoSQL for Startups
 
Back to Basics 2021
Back to Basics 2021Back to Basics 2021
Back to Basics 2021
 
DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩
 
Stop! Don't make these mistakes in your document database!
Stop! Don't make these mistakes in your document database!Stop! Don't make these mistakes in your document database!
Stop! Don't make these mistakes in your document database!
 
From Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database MindsetFrom Tables to Documents—Changing Your Database Mindset
From Tables to Documents—Changing Your Database Mindset
 
From Tables to Documents -- Changing Your Database Mindset
From Tables to Documents -- Changing Your Database MindsetFrom Tables to Documents -- Changing Your Database Mindset
From Tables to Documents -- Changing Your Database Mindset
 
Making #RemoteWork Actually Work
Making #RemoteWork Actually WorkMaking #RemoteWork Actually Work
Making #RemoteWork Actually Work
 
DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = 
 
MongoDB: Back to Basics
MongoDB:  Back to BasicsMongoDB:  Back to Basics
MongoDB: Back to Basics
 
Intro to MongoDB Workshop
Intro to MongoDB WorkshopIntro to MongoDB Workshop
Intro to MongoDB Workshop
 
Jumpstart! From SQL to NoSQL -- Changing Your Mindset
Jumpstart! From SQL to NoSQL -- Changing Your MindsetJumpstart! From SQL to NoSQL -- Changing Your Mindset
Jumpstart! From SQL to NoSQL -- Changing Your Mindset
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Getting Started with Graph Databases

Editor's Notes

  1. Tried to learn a little French on my flight here by watching Beauty and the Beast, but unfortunately nothing stuck. Instead, I’ll be presenting here in full-blown American English. Prereqs: put a couple of extra images in the images folder and redeploy Open the web ide Open the graph query editor l.au.ren.jh.ayw.ard@gmail.com
  2. Graph databases are a type of nosql database that focus not only on the data being stored but also on the relationships between the data. In relational databases, you have tables. In graph databases, you have nodes and edges.
  3. Nodes or vertexes. Think of the nodes as your nouns. It’s where you store information about your people, places, and things.
  4. Think of the edges as your verbs. It’s where you store information about the actions that connect your nodes.
  5. Property graphs allow you to store properties (or information about your data) in your nodes and edges.
  6. DB Engines Graph databases are increasing in popularity…but why? Graphs have some very important use cases.
  7. Let’s start with people. When people shop online, it can be incredibly helpful to see what other people like them purchased. Real-time recommendation engines can be efficiently run on graph databases.
  8. Graph databases can be used to determine the shortest or fastest path.
  9. Let’s talk about the internet of things. We live in a smart, connected world. Storing data about devices and all of their connections can be done quite easily in a graph database. Snapchat glasses
  10. One other common use case when you start combining people, places, and things is detecting fraud. When you need to search for patterns of fraudulent behavior, graph databases are a fantastic option. You can search for complex credit card fraud schemes. You can also search for things like insurance fraud.
  11. So should you care about graph databases? Absolutely! In this connected world where we need to do more with our data than just access it, graph databases help us efficiently store and gain insight into the connections and patterns of our data.
  12. It turns out that setting up a graph database can be really complicated. Apache TinkerPop is an open source graph computing framework that’s very popular. If you want to use TinkerPop, you’ll need to setup a graph database such as Titan, which requires you to also setup and configure Cassandra or HBase and Elastic Search. Assuming you like the system you set up, you’ll have to keep all of the systems up to date and ensure they’re always running. I don’t know about you, but that sounds a bit overwhelming to me. I’d rather just focus on my app and my data. IBM Graph is a fully-managed graph database service on Bluemix. You may have heard of Software as a Service. You can think of IBM Graph as TinkerPop as a Service. All of the concepts we learn today are going to be applicable to graph databases in general or TinkerPop. We’ll be using the Gremlin graph traversal language, which works with TinkerPop and is not specific to IBM Graph. There are 3 big perks that IBM Graph advertises It’s highly available, so your data is always accessible. It scales seamlessly, so you don’t have to worry about updating your graph database when your app becomes the next big thing. It’s managed 24/7 by IBM experts, so you don’t have to worry about upgrading or migrating your data as the technologies change. The biggest perk that we’ll see today is that it’s easy to setup and get going. We aren’t going to spend time messing with setting up a graph database.
  13. Nouns  Nodes or vertices Verbs  Edges
  14. A user can buy many prints. A print can be bought by many users. MULTI  Allows multiple edges of the same label between any pair of vertices. Other options include simple, many2one, one2many, and one2one.
  15. For simplicity Not storing passwords Shipping address stored at time of purchase only Only one print per order Simple payment method storage Not written All properties have cardinality of single, meaning only one value can be stored. Other options are set or list. Can extend the schema later to add other properties, vertices, and edges. For example, if we want to allow users to tag prints
  16. Indexes allow you to search your graph Can extend the schema later to add other indexes. For example, we might want to add an index on the buys edge to search by date. Composite – search by exact match. Mixed – search doesn’t have to be an exact match. For example, if you want to search for a user who last name starts with Sch, you would use a mixed index. Or if you wanted to search for prints whose price is less than $100, you would use a mixed index. Unique – should the property value be required to be unique? indexOnly – restrict the index to a particular vertex or edge
  17. Gremlin graph traversal language Create Show home page def gt = graph.traversal(); gt.addV(label, 'print', 'name', 'cruise', 'description', 'so much fun', 'price', '50', 'imgPath', '006.jpg','type', 'print'); Read Find the node for the Alaska print def gt = graph.traversal(); gt.V().hasLabel('print').has('name', 'Alaska'); Find the node for the Alaska print by id gt.V(idnumber) Who bought the Alaska print? (copy first one) gt.V().hasLabel('print').has('name', 'Alaska').in(); View the orders that include the Alaska print gt.V().hasLabel('print').has('name', 'Alaska').inE(); Update Show Alaska def gt = graph.traversal(); gt.V().hasLabel('print').has('name', 'Alaska'); def gt = graph.traversal(); gt.V().hasLabel('print').has('name', 'Alaska').property('description', 'A favorite pic!'); Delete Show the list of users Drop dale def gt = graph.traversal(); gt.V().hasLabel('user').has('username', 'dale'); gt.V().hasLabel('user').has('username', 'dale').drop(); Show the list of users again Drop all of the orders that Deanna had placed. Show Deanna’s orders def gt = graph.traversal(); gt.V().hasLabel('user').has('username', 'deanna'); gt.V().hasLabel('user').has('username', 'deanna').outE(); gt.V().hasLabel('user').has('username', 'deanna').outE().drop();
  18. Recommender/recommendation systems/platforms/engines are used to generate personalized recommendations for users. They vary in complexity and accuracy. Some systems work in real-time while others do not. Relevant recommendations can be incredibly helpful to your app’s users, which can in turn be incredibly helpful to your app’s engagement rate and sales. Win, win! Let me show you how I created a recommendation engine for the home page of Lauren’s Lovely Landscapes that displays the top 3 personalized recommendations for users who are signed in.
  19. The idea behind the TinkerPop recipe is collaborative filtering. Essentially, collaborative filtering assumes that if users share something in common with each other (for example, they’ve purchased the same item), those users are likely to share something else in common with each other. A major strength of graph databases is the ability to quickly generate real-time recommendations through collaborative filtering. Let me show you how this works.
  20. This is a graph representation of the sample data for Lauren’s Lovely Landscapes. Here you can see four users and six prints. The edges connecting the users and the prints represent purchases. Let’s say we want to find personalized recommendations for the user Dale.
  21. We’ll begin by looking to see what prints Dale has purchased.
  22. We can see he’s purchased Las Vegas, Australia, and Japan.
  23. Now, we’ll traverse the graph to see which users have bought those prints. We can see Jason, Joy, and Deanna have purchased those prints.
  24. Now, we’ll traverse out from those users to see what prints those users have bought. This will show us what prints Dale might also be interested in buying. We can exclude the prints that Dale has already purchased since we don’t want to recommend to him something he’s already purchased. We can see the prints that Jason, Joy, and Deanna have bought are Alaska and Antarctica. By counting the edges, we can see that Alaska has been purchased 3 times and Antarctica has been purchased 2 times. Therefore, Alaska will be our top recommendation for Dale.
  25. Query for personalized recommendations def gt = graph.traversal(); java.util.function.Function byNameImgPath = { Vertex v -> "" + v.value("name") + ":" + v.value("imgPath") }; gt.V().hasLabel("user").has("username", "dale").as("buyer") .out("buys").aggregate("bought") .in("buys").where(neq("buyer")).dedup() .out("buys").where(without("bought")) .groupCount().by(byNameImgPath).order(local).by(valueDecr).limit(local, 3); The homepage for Lauren's Lovely Landscapes aims to display three personalized recommendations. The query you just observed might not generate three recommendations. Here's why: (1) if the user is not authenticated or (2) if the user has purchased all or nearly all of the prints the common users have purchased so there are not three prints left to recommend. Query to find top-most purchased prints def gt = graph.traversal(); java.util.function.Function byNameImgPath = { Vertex v -> "" + v.value("name") + ":" + v.value("imgPath") }; gt.V().has("type", "user") .out("buys") .groupCount().by(byNameImgPath).order(local).by(valueDecr).limit(local, 3);