Getting Started with Graph Databases
rik@neotechnology.com
Getting Started with Graph Databases rik@neotechnology.com Agenda - - PowerPoint PPT Presentation
Getting Started with Graph Databases rik@neotechnology.com Agenda Introduction NO-SQL context What is Neo4j? When/why should I use it? Graph Queries Cypher query language Create and query data Graph Visualisations
Getting Started with Graph Databases
rik@neotechnology.com
Agenda
– NO-SQL context – What is Neo4j? – When/why should I use it?
– Cypher query language – Create and query data
Introduction
NOSQL is simply…
What’s so bad about
Relational
VOLUME
The Relational Crossroads
Four NOSQL Categories
arising from the “relational crossroads”
KV CF Doc
Graph
Denormalise Normalise
So what is a graph database?
– “end-user” transactions
http://en.wikipedia.org/wiki/File:Leonhard_Euler_2.jpg
Meet Leonhard Euler
Theory (1736)
Königsberg (Prussia) - 1736
A B D C
A B D C
1 2 3 4 7 6 5
What is a graph?
Vertice Edge
What is a graph?
Node
Relationship
What are graphs good for?
Data Complexity
complexity = f(size, semi-structure, connectedness)
Size
complexity = f(size, semi-structure, connectedness)
The Real Complexity
Semi-Structure
Semi-Structure
Email: rik@neotechnology.com Email: rik@vanbruggen.be Twitter: @rvanbruggen Skype: rvanbruggen
USER CONTACT
CONTACT_TYPE
FIRST_NAME LAST_NAME USER_ID EMAIL_1 EMAIL_2 TWITTER FACEBOOK SKYPE Rik Van Bruggen 315
rik@neotechnology.com rik@vanbruggen.be @rvanbruggenNULL
rvanbruggencomplexity = f(size, semi-structure, connectedness)
The Real Complexity
Examples of Connectedness
26
Graphs Are Everywhere
Neo4j is a Graph Database
model
Describing Graphs
Brouweri j Bockor
8
BREWS HAS_ALCOHOL_PERCENTAGE
hoge gisting, blond
IS_A
NeoBeer
PRECEDES
BeerBrand Brewery
Alcohol PercentageBeerType
A Hairball!
Querying a Graph
– Contextualized “ego-centric” queries
– Start node(s)
– 2 million+ joins per second
Index-free adjacency
Queries: Pattern Matching
Pattern
Don’t worry (as much) about the
Start Node
Pattern
Match
Pattern
Match
Pattern
Match
Pattern
Non-Match
Pattern
Non-Match
Pattern Not anchored to start node
Describing Graphs
Brouweri j Bockor
8
BREWS HAS_ALCOHOL_PERCENTAGE
hoge gisting, blond
IS_A
NeoBeer
8.1 7.9
PRECEDES PRECEDES
BeerBrand Brewery
Alcohol Percentage Alcohol Percentage Alcohol PercentageBeerType
Graph Visualisations
Neo4j Web Admin
Neoclipse
Neovigator
44
Other Visualisation options:
Case Studies
Contact Us
5-11 Lavington Street London SE1 0NZ ENGLAND +44 808 189 0493