Getting Started with Graph Databases rik@neotechnology.com Agenda - - PowerPoint PPT Presentation

getting started
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Getting Started with Graph Databases

rik@neotechnology.com

slide-2
SLIDE 2

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
  • Case Studies
  • Q&A
slide-3
SLIDE 3

Introduction

slide-4
SLIDE 4

Not Only SQL

NOSQL is simply…

slide-5
SLIDE 5

What’s so bad about

Relational

VOLUME

Complexity

slide-6
SLIDE 6

The Relational Crossroads

slide-7
SLIDE 7

Four NOSQL Categories

arising from the “relational crossroads”

KV CF Doc

Graph

Denormalise Normalise

slide-8
SLIDE 8

So what is a graph database?

  • OLTP database

– “end-user” transactions

  • Model, store, manage data as a graph
slide-9
SLIDE 9

http://en.wikipedia.org/wiki/File:Leonhard_Euler_2.jpg

Meet Leonhard Euler

  • Swiss mathematician
  • Inventor of Graph

Theory (1736)

slide-10
SLIDE 10

Königsberg (Prussia) - 1736

slide-11
SLIDE 11

A B D C

slide-12
SLIDE 12

A B D C

1 2 3 4 7 6 5

slide-13
SLIDE 13

What is a graph?

Vertice Edge

slide-14
SLIDE 14

What is a graph?

Node

Relationship

slide-15
SLIDE 15

What are graphs good for?

Complexity

slide-16
SLIDE 16

Data Complexity

complexity = f(size, semi-structure, connectedness)

slide-17
SLIDE 17

Size

slide-18
SLIDE 18

complexity = f(size, semi-structure, connectedness)

The Real Complexity

slide-19
SLIDE 19

Semi-Structure

slide-20
SLIDE 20

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 @rvanbruggen

NULL

rvanbruggen
slide-21
SLIDE 21

complexity = f(size, semi-structure, connectedness)

The Real Complexity

slide-22
SLIDE 22

Examples of Connectedness

slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26

26

slide-27
SLIDE 27

Graphs Are Everywhere

slide-28
SLIDE 28

Neo4j is a Graph Database

  • JVM based
  • ACID transactions
  • Query language
  • Rich Java APIs
  • Using the Property Graph

model

slide-29
SLIDE 29

Describing Graphs

Brouweri j Bockor

8

BREWS HAS_ALCOHOL_PERCENTAGE

hoge gisting, blond

IS_A

NeoBeer

PRECEDES

BeerBrand Brewery

Alcohol Percentage

BeerType

slide-30
SLIDE 30

A Hairball!

slide-31
SLIDE 31

Querying a Graph

  • Graph local

– Contextualized “ego-centric” queries

  • “Parachute” into graph

– Start node(s)

  • Found through Index lookups
  • Crawl the surrounding graph

– 2 million+ joins per second

  • No more Index lookups:

Index-free adjacency

slide-32
SLIDE 32

Queries: Pattern Matching

Pattern

slide-33
SLIDE 33

Don’t worry (as much) about the

Start Node

Pattern

slide-34
SLIDE 34

Match

Pattern

slide-35
SLIDE 35

Match

Pattern

slide-36
SLIDE 36

Match

Pattern

slide-37
SLIDE 37

Non-Match

Pattern

slide-38
SLIDE 38

Non-Match

Pattern Not anchored to start node

slide-39
SLIDE 39

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 Percentage

BeerType

slide-40
SLIDE 40

Graph Visualisations

  • Web Admin
  • Neography / Neovigator
  • Neoclipse
  • Gephi, Prefuse, d3.js, etc….
slide-41
SLIDE 41

Neo4j Web Admin

slide-42
SLIDE 42

Neoclipse

slide-43
SLIDE 43

Neovigator

slide-44
SLIDE 44

44

Other Visualisation options:

  • Linkurio.us
  • KeyLines
slide-45
SLIDE 45

Case Studies

slide-46
SLIDE 46

Contact Us

  • Neo Technology UK

5-11 Lavington Street London SE1 0NZ ENGLAND +44 808 189 0493

  • rik@neotechnology.com or
  • +32 478 686800