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

Big Data - Introducing Neo4J

Big Data - Introducing Neo4J

Presentation given by Jim Webber at recent 'Big Data Bash' in Belfast, introducing graph-based databases and Neo4J (See http://instil.co/2012/08/21/big-data-bash/)

Tara Simpson

October 03, 2012
Tweet

More Decks by Tara Simpson

Other Decks in Programming

Transcript

  1. Bomb the argies! Crush the miners! Defy Europe! I’m CEO,

    bitch! http://www.answers.com/topic/margaret-thatcher-large-
  2. stole from loves loves enemy enemy Victory of the Daleks

    appeared in appeared in companio n companio n enemy
  3. stole from loves loves enemy enemy A Good Man Goes

    to War appeared in appeared in appeared in appeared in Victory of the Daleks appeared in appeared in companio n companio n enemy
  4. Neo4j: Creating Nodes GraphDatabaseService db = new EmbeddedGraphDatabase("/tmp/neo"); Transaction tx

    = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor");
  5. Neo4j: Creating Nodes GraphDatabaseService db = new EmbeddedGraphDatabase("/tmp/neo"); Transaction tx

    = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor"); tx.success();
  6. Neo4j: Creating Nodes GraphDatabaseService db = new EmbeddedGraphDatabase("/tmp/neo"); Transaction tx

    = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor"); tx.success(); } finally {
  7. Neo4j: Creating Nodes GraphDatabaseService db = new EmbeddedGraphDatabase("/tmp/neo"); Transaction tx

    = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor"); tx.success(); } finally { tx.finish();
  8. Neo4j: Creating Nodes GraphDatabaseService db = new EmbeddedGraphDatabase("/tmp/neo"); Transaction tx

    = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor"); tx.success(); } finally { tx.finish(); }
  9. Neo4j: Creating Relationships Transaction tx = db.beginTx(); try { Node

    theDoctor = db.createNode(); theDoctor.setProperty("name", "The Doctor"); Node susan = db.createNode(); susan.setProperty("firstname", "Susan"); susan.setProperty("lastname", "Campbell"); susan.createRelationshipTo(theDoctor, COMPANION_OF)); tx.success(); } finally { tx.finish(); }
  10. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master)
  11. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it
  12. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11
  13. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very”
  14. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100
  15. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100
  16. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100
  17. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100 // Ooops!
  18. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100 // Ooops! DELETE master.niceness
  19. Cypher – A Humane “Query” Language // Create a simple

    graph CREATE doctor = { character : 'Doctor' }, master = { character : 'Master' }, (doctor)<-[e:ENEMY_OF]-(master) // Add some data into it SET doctor.awesomeness = 11 SET master.niceness = “very” SET e.weight = 100 // Ooops! DELETE master.niceness SET master.nastiness = “100%”
  20. character: Doctor actor: ??? episode: ??? title: ??? species: Cyberman

    -[:PLAYED]-> -[:APPEARED_IN]-> <-[:APPEARED_IN]- ASCII Art Queries!
  21. • Adobe Creative Cloud – Gazillions of social – Single

    large global cluster • Thingdom – Node.js, Neo4j – Now acquired by FiftyThree • Cisco network management – Nuff said • And now… Bingo Friendzy – Facebook gaming app from Gamesys