SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Graph Databases
             and Neo4j
                          twitter: @thobe / #neo4j
Tobias Ivarsson           email: tobias@neotechnology.com
                          web: http://www.neo4j.org/
Hacker @ Neo Technology   web: http://www.thobe.org/
We all know the
                                                              relational model.
Attendees                                                     It has been predominant
                                                              for a long time.
username         fullname      registration    speaker    payment


mtiberg     Michael Tiberg    null            no          0

thobe       Tobias Ivarsson   2010-04-07      yes         0

joe         John Doe          2010-02-05      no          700

      ...            ...             ...            ...            ...




                                                                     2
Attendees
                                                                            The relational model has
username         fullname        registration    speaker       payment      a few problems, such as:
                                                                            •poor support for sparse
                                                                            data
                                                                            •modifying the data
mtiberg     Michael Tiberg      null            no            0             model is almost
                                                                            exclusively done through
                                                                            adding tables
thobe       Tobias Ivarsson     2010-04-07      yes           0

joe         John Doe            2010-02-05      no            700

      ...            ...                 ...           ...          ...

Location
username        latitude         longitude            title       publish


thobe       55°36'47.70"N     12°58'34.50"E     Malmö         yes

                                                San
joe         37°49'36.00"N     122°25'22.00"W                  no
                                                Francisco

      ...          ...                 ...             ...          ...

                                                                                  3
Attendees                                                                     Sessions
      username           fullname        registration    speaker       payment      id       title time room ...

                                                                                    ...        ...        ...   ...        ...
     mtiberg      Michael Tiberg        null            no            0
                                                                                    ...        ...        ...   ...        ...
     thobe        Tobias Ivarsson       2010-04-07      yes           0
                                                                                    Session attendance
     joe          John Doe              2010-02-05      no            700                 session               user

           ...               ...                 ...           ...          ...             ...                  ...

      Location                                                                              ...                  ...
      username          latitude         longitude            title       publish

                                                                                    More complication...
     thobe        55°36'47.70"N       12°58'34.50"E     Malmö         yes                   ...                  ...
                                                                                              ...                  ...
After a while, modeling                                                                          ...                  ...
complex relationships                                                                              ...                  ...
leads to complicated
                                                                                            ......               ......
                                                        San                                      ......
schemasjoe            37°49'36.00"N   122°25'22.00"W                  no                                              ......
                                                        Francisco                           ......               ......
                                                                                                 ......               ......
           ...             ...                 ...             ...          ...

                                                                                                                  4
Most focus on scaling to large numbers
                                    Most of the emerging
                                    database technologies
                                    are concerned with
                                    scaling to huge amounts
                  A                 of data and massive load.
                                    They do so by making
                                    data opaque and
          G                 B       distribute elements based
                                    on key.




      F                         C




              E        D
                                             5
Most focus on scaling to large numbers
                                    Most of the emerging
                                    database technologies
                                    are concerned with
                                    scaling to huge amounts
                  A                 of data and massive load.
                                    They do so by making
                                    data opaque and
          G                 B       distribute elements based
                                    on key.




      F                         C




              E        D
                                             5
Most focus on scaling to large numbers
                                    Most of the emerging
                                    database technologies
                                    are concerned with
                                    scaling to huge amounts
                  A                 of data and massive load.
                                    They do so by making
                                    data opaque and
          G                 B       distribute elements based
                                    on key.




      F                         C




              E        D
                                             5
Most focus on scaling to large numbers
                                    Most of the emerging
                                    database technologies
                                    are concerned with
                                    scaling to huge amounts
                  A                 of data and massive load.
                                    They do so by making
                                    data opaque and
          G                 B       distribute elements based
                                    on key.




      F                         C




              E        D
                                             5
Most focus on scaling to large numbers
                                    Most of the emerging
                                    database technologies
                                    are concerned with
                                    scaling to huge amounts
                  A                 of data and massive load.
                                    They do so by making
                                    data opaque and
          G                 B       distribute elements based
                                    on key.




      F                         C




              E        D
                                             5
Scaling to size vs. Scaling to complexity
    Size
       Key/Value stores

                          Bigtable clones

                                            Document databases

                                                                 Graph databases




                                                                           Complexity

                                                                                   6
Scaling to size vs. Scaling to complexity
    Size
       Key/Value stores

                          Bigtable clones

                                            Document databases

                                                                 Graph databases
                                                                             Billions of nodes
                                                                             and relationships




                                > 90% of use cases

                                                                           Complexity

                                                                                    6
The Property Graph data model




•Nodes
•Relationships bet ween Nodes
•Relationships have Labels
•Relationships are directed, but traversed at
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties              7
The Property Graph data model




•Nodes
•Relationships bet ween Nodes
•Relationships have Labels
•Relationships are directed, but traversed at
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties              7
The Property Graph data model




•Nodes
•Relationships bet ween Nodes
•Relationships have Labels
•Relationships are directed, but traversed at
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties              7
The Property Graph data model


                                                      LIVES WITH
                                                               LOVES



                                         OWNS
                                                                       DRIVES

•Nodes
•Relationships bet ween Nodes
•Relationships have Labels
•Relationships are directed, but traversed at
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties                                        7
The Property Graph data model

                                                                 LOVES

                                                      LIVES WITH
                                                               LOVES



                                         OWNS
                                                                       DRIVES

•Nodes
•Relationships bet ween Nodes
•Relationships have Labels
•Relationships are directed, but traversed at
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties                                        7
The Property Graph data model
                                                                                name: “Mary”
                                                                 LOVES
             name: “James”                                                      age: 35
             age: 32                                  LIVES WITH
             twitter: “@spam”                                  LOVES



                                         OWNS
                                                                       DRIVES

•Nodes
•Relationships bet ween Nodes
•Relationships have Labels                                     brand: “Volvo”
•Relationships are directed, but traversed at                  model: “V70”
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties                                                  7
The Property Graph data model
                                                                                name: “Mary”
                                                                 LOVES
             name: “James”                                                      age: 35
             age: 32                                  LIVES WITH
             twitter: “@spam”                                  LOVES



                                         OWNS
                                     item type: “car”                  DRIVES

•Nodes
•Relationships bet ween Nodes
•Relationships have Labels                                     brand: “Volvo”
•Relationships are directed, but traversed at                  model: “V70”
equal speed in both directions
•The semantics of the direction is up to the
application (LIVES WITH is reflexive, LOVES is not)
•Nodes have key-value properties
•Relationships have key-value properties                                                  7
Graphs are whiteboard friendly                  An application domain model
                                                outlined on a whiteboard or piece
                                                of paper would be translated to
                                                an ER-diagram, then normalized
                                                to fit a Relational Database.
                                                With a Graph Database the model
                                                from the whiteboard is
                                                implemented directly.




                         Image credits: Tobias Ivarsson            8
Graphs are whiteboard friendly                         An application domain model
                                                       outlined on a whiteboard or piece
                                                       of paper would be translated to
                                                       an ER-diagram, then normalized
                                                       to fit a Relational Database.
                                                       With a Graph Database the model
                                                       from the whiteboard is
                                                       implemented directly.

                            *
                    1
                                          *
            *           1




            *                                 1
                        *

                   1
                            *


                                Image credits: Tobias Ivarsson            8
Graphs are whiteboard friendly                         An application domain model
                                                       outlined on a whiteboard or piece
                                                       of paper would be translated to
                                                       an ER-diagram, then normalized
                                                       to fit a Relational Database.
                                                       With a Graph Database the model
                                                       from the whiteboard is
                                                       implemented directly.
                        thobe



                                       Joe project blog


                                     Wardrobe Strength


                 Hello Joe

                 Modularizing Jython

                    Neo4j performance analysis
                                Image credits: Tobias Ivarsson            8
What is Neo4j?
๏ Neo4j is a Graph Database
   • Non-relational (“#nosql”), transactional (ACID), embedded
   • Data is stored as a Graph / Network
      ‣Nodes and Relationships with properties
      ‣“Property Graph” or “edge-labeled multidigraph”
๏ Neo4j is Open Source / Free (as in speech) Software
   • AGPLv3
                                                         Prices are available at
                                                         http://neotechnology.com/



   • Commercial (“dual license”) license available
                                                         Contact us if you have
                                                         questions and/or special
                                                         license needs (e.g. if you
                                                         want an evaluation license)

      ‣Free (as in beer) for first server installation
      ‣Inexpensive (as in startup-friendly) when you grow           9
More about Neo4j
๏ Neo4j is stable
   • In 24/7 operation since 2003
๏ Neo4j is in active development
   • Neo Technology received VC funding October 2009
๏ Neo4j delivers high performance graph operations
   • traverses 1’000’000+ relationships / second
       on commodity hardware




                                                       10
http://neotechnology.com
Path exists in social network
๏ Each person has on average 50 friends
             Tobias



                                   Emil



                 Johan
                                           Peter



        Database               # persons query time
  Relational database                 1 000  2 000 ms
  Neo4j Graph Database                1 000      2 ms
  Neo4j Graph Database            1 000 000      2 ms
                                                   12
Path exists in social network
๏ Each person has on average 50 friends
             Tobias



                                   Emil



                 Johan
                                           Peter



        Database               # persons query time
  Relational database                 1 000  2 000 ms
  Neo4j Graph Database                1 000      2 ms
  Neo4j Graph Database            1 000 000      2 ms
                                                   12
Path exists in social network
๏ Each person has on average 50 friends
             Tobias



                                   Emil



                 Johan
                                           Peter



        Database               # persons query time
  Relational database                 1 000  2 000 ms
  Neo4j Graph Database                1 000      2 ms
  Neo4j Graph Database            1 000 000      2 ms
                                                   12
Path exists in social network
๏ Each person has on average 50 friends
             Tobias



                                   Emil



                 Johan
                                           Peter



        Database               # persons query time
  Relational database                 1 000  2 000 ms
  Neo4j Graph Database                1 000      2 ms
  Neo4j Graph Database            1 000 000      2 ms
                                                   12

Contenu connexe

En vedette

Neo4j - 5 cool graph examples
Neo4j - 5 cool graph examplesNeo4j - 5 cool graph examples
Neo4j - 5 cool graph examples
Peter Neubauer
 

En vedette (19)

Influx db talk-20150415
Influx db talk-20150415Influx db talk-20150415
Influx db talk-20150415
 
Level DB - Quick Cheat Sheet
Level DB - Quick Cheat SheetLevel DB - Quick Cheat Sheet
Level DB - Quick Cheat Sheet
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of Golang
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
Google Go! language
Google Go! languageGoogle Go! language
Google Go! language
 
Golang concurrency design
Golang concurrency designGolang concurrency design
Golang concurrency design
 
Intro to Neo4j presentation
Intro to Neo4j presentationIntro to Neo4j presentation
Intro to Neo4j presentation
 
Golang
GolangGolang
Golang
 
Etcd- Mission Critical Key-Value Store
Etcd- Mission Critical Key-Value StoreEtcd- Mission Critical Key-Value Store
Etcd- Mission Critical Key-Value Store
 
Paris Container Day 2016 : Etcd - overview and future (CoreOS)
Paris Container Day 2016 : Etcd - overview and future (CoreOS)Paris Container Day 2016 : Etcd - overview and future (CoreOS)
Paris Container Day 2016 : Etcd - overview and future (CoreOS)
 
Beautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDBBeautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDB
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
 
5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence
 
Neo4j - 5 cool graph examples
Neo4j - 5 cool graph examplesNeo4j - 5 cool graph examples
Neo4j - 5 cool graph examples
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
SoftLayer-demoLabV3
SoftLayer-demoLabV3SoftLayer-demoLabV3
SoftLayer-demoLabV3
 
Boltdb - an embedded key value database
Boltdb - an embedded key value databaseBoltdb - an embedded key value database
Boltdb - an embedded key value database
 

Plus de Skills Matter

Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheim
Skills Matter
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
Skills Matter
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
Skills Matter
 
Bootstrapping a-devops-matter
Bootstrapping a-devops-matterBootstrapping a-devops-matter
Bootstrapping a-devops-matter
Skills Matter
 

Plus de Skills Matter (20)

Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheim
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberl
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.js
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source world
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testing
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4j
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Plug 20110217
Plug   20110217Plug   20110217
Plug 20110217
 
Lug presentation
Lug presentationLug presentation
Lug presentation
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
 
Plug saiku
Plug   saikuPlug   saiku
Plug saiku
 
Huguk lily
Huguk lilyHuguk lily
Huguk lily
 
Bootstrapping a-devops-matter
Bootstrapping a-devops-matterBootstrapping a-devops-matter
Bootstrapping a-devops-matter
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Geek Nights Neo4j Code Jam

  • 1. Graph Databases and Neo4j twitter: @thobe / #neo4j Tobias Ivarsson email: tobias@neotechnology.com web: http://www.neo4j.org/ Hacker @ Neo Technology web: http://www.thobe.org/
  • 2. We all know the relational model. Attendees It has been predominant for a long time. username fullname registration speaker payment mtiberg Michael Tiberg null no 0 thobe Tobias Ivarsson 2010-04-07 yes 0 joe John Doe 2010-02-05 no 700 ... ... ... ... ... 2
  • 3. Attendees The relational model has username fullname registration speaker payment a few problems, such as: •poor support for sparse data •modifying the data mtiberg Michael Tiberg null no 0 model is almost exclusively done through adding tables thobe Tobias Ivarsson 2010-04-07 yes 0 joe John Doe 2010-02-05 no 700 ... ... ... ... ... Location username latitude longitude title publish thobe 55°36'47.70"N 12°58'34.50"E Malmö yes San joe 37°49'36.00"N 122°25'22.00"W no Francisco ... ... ... ... ... 3
  • 4. Attendees Sessions username fullname registration speaker payment id title time room ... ... ... ... ... ... mtiberg Michael Tiberg null no 0 ... ... ... ... ... thobe Tobias Ivarsson 2010-04-07 yes 0 Session attendance joe John Doe 2010-02-05 no 700 session user ... ... ... ... ... ... ... Location ... ... username latitude longitude title publish More complication... thobe 55°36'47.70"N 12°58'34.50"E Malmö yes ... ... ... ... After a while, modeling ... ... complex relationships ... ... leads to complicated ...... ...... San ...... schemasjoe 37°49'36.00"N 122°25'22.00"W no ...... Francisco ...... ...... ...... ...... ... ... ... ... ... 4
  • 5. Most focus on scaling to large numbers Most of the emerging database technologies are concerned with scaling to huge amounts A of data and massive load. They do so by making data opaque and G B distribute elements based on key. F C E D 5
  • 6. Most focus on scaling to large numbers Most of the emerging database technologies are concerned with scaling to huge amounts A of data and massive load. They do so by making data opaque and G B distribute elements based on key. F C E D 5
  • 7. Most focus on scaling to large numbers Most of the emerging database technologies are concerned with scaling to huge amounts A of data and massive load. They do so by making data opaque and G B distribute elements based on key. F C E D 5
  • 8. Most focus on scaling to large numbers Most of the emerging database technologies are concerned with scaling to huge amounts A of data and massive load. They do so by making data opaque and G B distribute elements based on key. F C E D 5
  • 9. Most focus on scaling to large numbers Most of the emerging database technologies are concerned with scaling to huge amounts A of data and massive load. They do so by making data opaque and G B distribute elements based on key. F C E D 5
  • 10. Scaling to size vs. Scaling to complexity Size Key/Value stores Bigtable clones Document databases Graph databases Complexity 6
  • 11. Scaling to size vs. Scaling to complexity Size Key/Value stores Bigtable clones Document databases Graph databases Billions of nodes and relationships > 90% of use cases Complexity 6
  • 12. The Property Graph data model •Nodes •Relationships bet ween Nodes •Relationships have Labels •Relationships are directed, but traversed at equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 13. The Property Graph data model •Nodes •Relationships bet ween Nodes •Relationships have Labels •Relationships are directed, but traversed at equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 14. The Property Graph data model •Nodes •Relationships bet ween Nodes •Relationships have Labels •Relationships are directed, but traversed at equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 15. The Property Graph data model LIVES WITH LOVES OWNS DRIVES •Nodes •Relationships bet ween Nodes •Relationships have Labels •Relationships are directed, but traversed at equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 16. The Property Graph data model LOVES LIVES WITH LOVES OWNS DRIVES •Nodes •Relationships bet ween Nodes •Relationships have Labels •Relationships are directed, but traversed at equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 17. The Property Graph data model name: “Mary” LOVES name: “James” age: 35 age: 32 LIVES WITH twitter: “@spam” LOVES OWNS DRIVES •Nodes •Relationships bet ween Nodes •Relationships have Labels brand: “Volvo” •Relationships are directed, but traversed at model: “V70” equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 18. The Property Graph data model name: “Mary” LOVES name: “James” age: 35 age: 32 LIVES WITH twitter: “@spam” LOVES OWNS item type: “car” DRIVES •Nodes •Relationships bet ween Nodes •Relationships have Labels brand: “Volvo” •Relationships are directed, but traversed at model: “V70” equal speed in both directions •The semantics of the direction is up to the application (LIVES WITH is reflexive, LOVES is not) •Nodes have key-value properties •Relationships have key-value properties 7
  • 19. Graphs are whiteboard friendly An application domain model outlined on a whiteboard or piece of paper would be translated to an ER-diagram, then normalized to fit a Relational Database. With a Graph Database the model from the whiteboard is implemented directly. Image credits: Tobias Ivarsson 8
  • 20. Graphs are whiteboard friendly An application domain model outlined on a whiteboard or piece of paper would be translated to an ER-diagram, then normalized to fit a Relational Database. With a Graph Database the model from the whiteboard is implemented directly. * 1 * * 1 * 1 * 1 * Image credits: Tobias Ivarsson 8
  • 21. Graphs are whiteboard friendly An application domain model outlined on a whiteboard or piece of paper would be translated to an ER-diagram, then normalized to fit a Relational Database. With a Graph Database the model from the whiteboard is implemented directly. thobe Joe project blog Wardrobe Strength Hello Joe Modularizing Jython Neo4j performance analysis Image credits: Tobias Ivarsson 8
  • 22. What is Neo4j? ๏ Neo4j is a Graph Database • Non-relational (“#nosql”), transactional (ACID), embedded • Data is stored as a Graph / Network ‣Nodes and Relationships with properties ‣“Property Graph” or “edge-labeled multidigraph” ๏ Neo4j is Open Source / Free (as in speech) Software • AGPLv3 Prices are available at http://neotechnology.com/ • Commercial (“dual license”) license available Contact us if you have questions and/or special license needs (e.g. if you want an evaluation license) ‣Free (as in beer) for first server installation ‣Inexpensive (as in startup-friendly) when you grow 9
  • 23. More about Neo4j ๏ Neo4j is stable • In 24/7 operation since 2003 ๏ Neo4j is in active development • Neo Technology received VC funding October 2009 ๏ Neo4j delivers high performance graph operations • traverses 1’000’000+ relationships / second on commodity hardware 10
  • 25. Path exists in social network ๏ Each person has on average 50 friends Tobias Emil Johan Peter Database # persons query time Relational database 1 000 2 000 ms Neo4j Graph Database 1 000 2 ms Neo4j Graph Database 1 000 000 2 ms 12
  • 26. Path exists in social network ๏ Each person has on average 50 friends Tobias Emil Johan Peter Database # persons query time Relational database 1 000 2 000 ms Neo4j Graph Database 1 000 2 ms Neo4j Graph Database 1 000 000 2 ms 12
  • 27. Path exists in social network ๏ Each person has on average 50 friends Tobias Emil Johan Peter Database # persons query time Relational database 1 000 2 000 ms Neo4j Graph Database 1 000 2 ms Neo4j Graph Database 1 000 000 2 ms 12
  • 28. Path exists in social network ๏ Each person has on average 50 friends Tobias Emil Johan Peter Database # persons query time Relational database 1 000 2 000 ms Neo4j Graph Database 1 000 2 ms Neo4j Graph Database 1 000 000 2 ms 12