Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Neo4j - What is this hipster graph thingy?

Neo4j - What is this hipster graph thingy?

Talk I gave at RubyC in Kiev: http://rubyc.eu/

Source code used for the demo: https://github.com/mrfoto/neo4hub/

More info:
- Neo4j official page: http://neo4j.com/
- Neo4j meets Ruby: http://www.neo4j-ruby.org/
- Neo4jrb documentation: http://neo4jrb.readthedocs.org/en/latest/
- Free Online Training provided by Neo4j: http://neo4j.com/graphacademy/online-course/

5a5fcbae333f071dc7a28f4958509db5?s=128

Miha Rekar

May 30, 2015
Tweet

More Decks by Miha Rekar

Other Decks in Technology

Transcript

  1. WHAT IS THIS HIPSTER GRAPH THINGY?

  2. WHAT IS THIS HIPSTER GRAPH THINGY?

  3. GRAPH

  4. GRAPH NO!

  5. GRAPH DB • nodes • edges / relationships • properties

    / attributes
  6. WHY? • natural • graphs are everywhere • easy to

    think about
  7. RELATIONAL DB

  8. RELATIONAL DB

  9. GRAPH DB

  10. NETWORK & DATA CENTER

  11. RECOMMENDATIONS

  12. SOCIAL

  13. ACCESS MANAGEMENT

  14. NEO4J • NoSQL • open-source • Java/Scala • the most

    popular graph DB • full DB characteristics (ACID compliance, cluster support, runtime failover)
  15. None
  16. GETTING STARTED • brew install neo4j • neo4j start •

    gem 'neo4j' • http://localhost:7474/
  17. CYPHER • SQL-like • ASCII-ish SELECT firstname FROM person WHERE

    person.nickname= 'The Dude' MATCH p:person WHERE p.nickname= 'The Dude' RETURN p.firstname
  18. CYPHER • SQL-like • ASCII-ish SELECT firstname FROM person WHERE

    person.nickname= 'The Dude' MATCH p:person WHERE p.nickname= 'The Dude' RETURN p.firstname FROM person JOIN team ON person.teamid = team.id WHERE person.nickname= 'The Dude' AND team.sport = 'Bowling' MATCH (p:person)-[:in]->(t:team) WHERE p.nickname= 'The Dude' AND t.sport = 'Bowling' RETURN p.firstname, t.name
  19. CYPHER • SQL-like • ASCII-ish SELECT firstname FROM person WHERE

    person.nickname= 'The Dude' MATCH p:person WHERE p.nickname= 'The Dude' RETURN p.firstname FROM person JOIN team ON person.teamid = team.id WHERE person.nickname= 'The Dude' AND team.sport = 'Bowling' MATCH (p:person)-[:in]->(t:team) WHERE p.nickname= 'The Dude' AND t.sport = 'Bowling' RETURN p.firstname, t.name MATCH (p:person)-[*]-(p2:person) WHERE p.nickname= 'The Dude' RETURN p.firstname, p2.firstname MATCH (p:person{nickname: 'The Dude'})-[*]-(p2:person) RETURN p.firstname, p2.firstname
  20. DEMO

  21. Q&A

  22. http://mr.si/
 @mr_foto THANK YOU http://rug.si/
 @RubySlovenia