NOSQL Exchange 2012

NOSQL at the crossroads

Alistair Jones

How do graphs fit into NOSQL?

Why Neo4j?

NOSQL

[ scale ]

source: NASA

Buffering...

[ performance ]

[ simplicity ]

source: RightNow community documentation

NOSQL

  • Key-Value
  • Document
  • Column-Family
  • Graph
  • Aggregates

AGGREGATE

DENORMALISE

graph model

  • N
  • N
  • N
  • R
  • R
  • R

flexible model

  • Alistair
  • London
  • Neo4j
  • lives in
  • develops
  • Schema-free
  • Relate anything to anything
  • Store any property anywhere

flexibility with data quality

? (can't happen)
  • Prevents dangling relationships
  • => referential integrity is automatic
  • ACID transactions

shortest path

hierarchies

recommend a friend

FAST

departments
dept_id dept_name parent_dept_id
1 ACME Corp null
2 Widgets 1
3 Corporate 1
4 Widget marketing 2
5 Widget engineering 2
employees
employee_id dept_id employee_name
1 1 John
2 2 Mary
3 3 Steve
4 3 James
5 4 David
6 4 Liz
7 5 Dan
  • ACME
  • Widgets
  • Corporate
  • marketing
  • engineering
  • David
  • Liz
  • Dan
  • John
  • Mary
  • Steve
  • James
  • parent
  • parent
  • parent
  • parent
  • works_in
  • works_in
  • works_in
  • owns
  • works_in
  • works_in
  • works_in

Who works in the 'Widgets' department and its sub-departments?

start department = node:Department(name='Widgets')
match employee -[:works_in]-> sub_department
      -[0..*:parent]-> department
return employee

Why do people use Neo4j?

  • Performance: for their problem, significantly faster than any other database technology
  • Flexibility: store multiple overlapping hierarchies and networks, unconstrained by a fixed schema
  • Transactions: ensure the consistency required for mission-critical enterprise data

logistics

asset management & access control

network impact analysis

Thanks for listening!

Alistair Jones

@apcj

alistair.jones@neotechnology.com