What is this hipster graph thingy?

5a5fcbae333f071dc7a28f4958509db5?s=47 Miha Rekar
November 06, 2015

What is this hipster graph thingy?

Talk I gave at Rails Remote Conf: https://railsremoteconf.com/

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

November 06, 2015
Tweet

Transcript

  1. WHAT IS THIS HIPSTER GRAPH THINGY?

  2. GRAPH NO!

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

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

    think about
  5. RELATIONAL DB

  6. RELATIONAL DB

  7. GRAPH DB

  8. RELATIONAL DB

  9. GRAPH DB

  10. RECOMMENDATIONS

  11. SOCIAL

  12. ACCESS MANAGEMENT

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

    popular graph DB • full DB characteristics (ACID compliance, scalable clustering, fail-over, high-availability, live backups, and comprehensive monitoring)
  14. None
  15. GETTING STARTED • brew install neo4j • neo4j start •

    gem 'neo4j' • http://localhost:7474/
  16. 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
  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 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
  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 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
  19. DEMO

  20. Q&A

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