SlideShare ist ein Scribd-Unternehmen logo
1 von 51
NOSQL Databases and
      Neo4j
Database and DBMS
• Database - Organized collection of data
• The term database is correctly applied to the
  data and their supporting data structures.

• DBMS - Database Management System: a
  software package with computer programs
  that controls the creation, maintenance and
  use of a database.
Types of Happening Databases
• Relational database – nothing new but still in use
  and it seems it will always be a happening one.
• Cloud databases – everything is cloudy.
• Data warehouse – Huge! Huge! Huge! archives.
• Embedded databases – you can’t see them :P
• Document oriented database – the In thing.
• Hypermedia database – WWW.
• Graph database – facebook, twitter, social
  network.
NOSQL is simply…



Not OnlySQL
Why NOSQL now?

   Driving trends
Trend 1: Data Size
3000

                                   2011?
2500

2000

1500

                            2010
1000

 500                 2009
       2007   2008
  0
Trend 2: Connectedness
                                                                                          GGG
                                                                                 Onotologies

                                                                              RDFa


                                                                         Folksonomies
Information connectivity




                                                               Tagging

                                                     Wikis

                                                               UGC

                                                       Blogs

                                                    Feeds


                                        Hypertext
                              Text
                           Documents
Trend 3: Semi-structured information
• Individualisationof content
  – 1970’s salary lists, all elements exactly one job
  – 2000’s salary lists, we need many job columns!
• Store more data about each entity
• Trend accelerated by the decentralization of
  content generation
  – Age of participation (“web 2.0”)
Trend 4: Architecture
1980’s: Single Application




                             Application




                                 DB
Trend 4: Architecture
1990’s: Integration
Database Antipattern



           Application   Application   Application




                             DB
Trend 4: Architecture
2000’s: SOA

                   RESTful, hypermedia, composite apps

              Application        Application             Application




                  DB                 DB                      DB
Side note: RDBMS performance
 Salary list



               Most Web apps



                               Social Network



                                          Location-based services
Four NOSQL Categories
Four NOSQL Categories
Key-Value Stores
• “Dynamo: Amazon’s Highly Available Key-
  Value Store” (2007)
• Data model:
  – Global key-value mapping
  – Highly fault tolerant (typically)
• Examples:
  – Riak, Redis, Voldemort
Column Family (BigTable)
• Google’s “Bigtable: A Distributed Storage
  System for Structured Data” (2006)
• Data model:
  – A big table, with column families
  – Map-reduce for querying/processing
• Examples:
  – HBase, HyperTable, Cassandra
Document Databases
• Data model
  – Collections of documents
  – A document is a key-value collection
  – Index-centric, lots of map-reduce
• Examples
  – CouchDB, MongoDB
Graph Databases
• Data model:
  – Nodes with properties
  – Named relationships with properties
  – Hypergraph, sometimes
• Examples:
  – Neo4j (of
    course), SonesGraphDB, OrientDB, InfiniteGraph,
    AllegroGraph
Why Graph Databases?
• Schema Less and Efficient storage of Semi Structured Information
• No O/R mismatch – very natural to map a graph to an Object
  Oriented language like Ruby.
• Express Queries as Traversals. Fast deep traversal instead of slow
  SQL queries that span many table joins.
• Very natural to express graph related problem with traversals
  (recommendation engine, find shortest parth etc..)
• Seamless integration with various existing programming languages.
• ACID Transaction with rollbacks support.
• Whiteboard friendly – you use the language of node,properties and
  relationship to describe your domain (instead of e.g. UML) and
  there is no need to have a complicated O/R mapping tool to
  implement it in your database. You can say that Neo4j is
  “Whiteboard friendly” !(http://video.neo4j.org/JHU6F/live-graph-
  session-how-allison-knows-james/)
Social Network “path exists”
              Performance
• Experiment:
  • ~1k persons                           # persons query time

  • Average 50 friends per   Relational   1000      2000ms
                             database
    person
  • pathExists(a,b)
    limited to depth 4
Social Network “path exists”
              Performance
• Experiment:
  • ~1k persons                           # persons query time

  • Average 50 friends per   Relational   1000      2000ms
                             database
    person
                             Neo4j        1000      2ms
  • pathExists(a,b)
    limited to depth 4
Social Network “path exists”
              Performance
• Experiment:
  • ~1k persons                           # persons query time

  • Average 50 friends per   Relational   1000      2000ms
                             database
    person
                             Neo4j        1000      2ms
  • pathExists(a,b)
                             Neo4j        1000000   2ms
    limited to depth 4
What are graphs good for?
•   Recommendations
•   Business intelligence
•   Social computing
•   Geospatial
•   Systems management
•   Web of things
•   Genealogy
•   Time series data
•   Product catalogue
•   Web analytics
•   Scientific computing (especially bioinformatics)
•   Indexing your slow RDBMS
•   And much more!
Graphs
Directed Graphs
Breadth First Search
Depth First Search


  ?????????????????
Graph Databases


• A graph database stores data in a graph, the
  most generic of data structures, capable of
  elegantly representing any kind of data in a
  highly accessible way.
Graphs
• “A Graph —records data in→ Nodes —which
  have→ Properties”
Graphs
• “Nodes —are organized by→ Relationships —
  which also have→ Properties”
Query a graph with Traversal
• “A Traversal —navigates→ a Graph; it —
  identifies→ Paths —which order→ Nodes”
Indexes
• “An Index —maps from→ Properties —to
  either→ Nodes or Relationships”
Neo4j is a Graph Database
• “A Graph Database —manages a→ Graph and
  —also manages related→ Indexes”
Neo4j – Hey! This is why I am a Graph
             Database.
• The fundamental units that form a graph are
  nodes and relationships.

• In Neo4j, both nodes and relationships can
  contain properties.

• Nodes are often used to represent
  entities, but depending on the domain
  relationships may be used for that purpose as
  well.
Node in Neo4j
Relationships in Neo4j
• Relationships between nodes are a key part of
  Neo4j.
Relationships in Neo4j
Twitter and relationships
Properties
• Both nodes and relationships can have
  properties.
• Properties are key-value pairs where the key is
  a string.
• Property values can be either a primitive or an
array of one primitive type.
  For example String, int and int[] values are
  valid for properties.
Properties
Paths in Neo4j
• A path is one or more nodes with connecting
  relationships, typically retrieved as a query or
  traversal result.
Traversals in Neo4j
• Traversing a graph means visiting its nodes,
  following relationships according to some rules.

• In most cases only a subgraph is visited, as you
  already know where in the graph the interesting
  nodes and relationships are found.

• Traversal API

• Depth first and Breadth first.
Starting and Stopping
Preparing the database
Wrap mutating operations in a
       transaction.
Creating a small graph
Print the data
Remove the data
The Matrix Graph Database
Traversing the Graph
Resources & References
• Neo4j website : http://neo4j.org/
• Neo4j learning resources:
  http://neo4j.org/resources/
• Videos about Neo4j: http://video.neo4j.org/
• Neo4j tutorial:
  http://docs.neo4j.org/chunked/snapshot/tuto
  rials.html
• Neo4j Java API documentation:
  http://api.neo4j.org/current/

Weitere ähnliche Inhalte

Was ist angesagt?

NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jTobias Lindaaker
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesDataStax
 
The Case for Graphs in Supply Chains
The Case for Graphs in Supply ChainsThe Case for Graphs in Supply Chains
The Case for Graphs in Supply ChainsNeo4j
 
Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4jNeo4j
 
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...Streamline Data Governance with Egeria: The Industry's First Open Metadata St...
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...DataWorks Summit
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsDATAVERSITY
 
Big Data PPT by Rohit Dubey
Big Data PPT by Rohit DubeyBig Data PPT by Rohit Dubey
Big Data PPT by Rohit DubeyRohit Dubey
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introductionDinesh K
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to GraphsNeo4j
 
Your Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph StrategyYour Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph StrategyNeo4j
 
Data Lake Overview
Data Lake OverviewData Lake Overview
Data Lake OverviewJames Serra
 
Neo4j 4 Overview
Neo4j 4 OverviewNeo4j 4 Overview
Neo4j 4 OverviewNeo4j
 
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...Databricks
 
Knowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based SearchKnowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based SearchNeo4j
 
Google Knowledge Graph
Google Knowledge GraphGoogle Knowledge Graph
Google Knowledge Graphkarthikzinavo
 

Was ist angesagt? (20)

NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4jNOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
Enterprise Knowledge Graph
Enterprise Knowledge GraphEnterprise Knowledge Graph
Enterprise Knowledge Graph
 
The Case for Graphs in Supply Chains
The Case for Graphs in Supply ChainsThe Case for Graphs in Supply Chains
The Case for Graphs in Supply Chains
 
Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4j
 
Big Data
Big DataBig Data
Big Data
 
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...Streamline Data Governance with Egeria: The Industry's First Open Metadata St...
Streamline Data Governance with Egeria: The Industry's First Open Metadata St...
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property Graphs
 
Big Data PPT by Rohit Dubey
Big Data PPT by Rohit DubeyBig Data PPT by Rohit Dubey
Big Data PPT by Rohit Dubey
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to Graphs
 
Your Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph StrategyYour Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph Strategy
 
Data Lake Overview
Data Lake OverviewData Lake Overview
Data Lake Overview
 
Neo4j 4 Overview
Neo4j 4 OverviewNeo4j 4 Overview
Neo4j 4 Overview
 
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
 
Knowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based SearchKnowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based Search
 
Google Knowledge Graph
Google Knowledge GraphGoogle Knowledge Graph
Google Knowledge Graph
 

Andere mochten auch

Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4jNeo4j
 
Using a Graph Database for Next-Gen MDM
Using a Graph Database for Next-Gen MDMUsing a Graph Database for Next-Gen MDM
Using a Graph Database for Next-Gen MDMNeo4j
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph DatabasesInfiniteGraph
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendationsproksik
 
Converting Relational to Graph Databases
Converting Relational to Graph DatabasesConverting Relational to Graph Databases
Converting Relational to Graph DatabasesAntonio Maccioni
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayDataStax Academy
 
Graph Database, a little connected tour - Castano
Graph Database, a little connected tour - CastanoGraph Database, a little connected tour - Castano
Graph Database, a little connected tour - CastanoCodemotion
 
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, ...Neo4j
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - ImportNeo4j
 
Semantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesSemantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesCambridge Semantics
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDaysNeo4j
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDataminingTools Inc
 

Andere mochten auch (16)

Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
Using a Graph Database for Next-Gen MDM
Using a Graph Database for Next-Gen MDMUsing a Graph Database for Next-Gen MDM
Using a Graph Database for Next-Gen MDM
 
Relational vs. Non-Relational
Relational vs. Non-RelationalRelational vs. Non-Relational
Relational vs. Non-Relational
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendations
 
Lju Lazarevic
Lju LazarevicLju Lazarevic
Lju Lazarevic
 
Converting Relational to Graph Databases
Converting Relational to Graph DatabasesConverting Relational to Graph Databases
Converting Relational to Graph Databases
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBay
 
Graph Database, a little connected tour - Castano
Graph Database, a little connected tour - CastanoGraph Database, a little connected tour - Castano
Graph Database, a little connected tour - Castano
 
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, ...
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
Relational to Graph - Import
Relational to Graph - ImportRelational to Graph - Import
Relational to Graph - Import
 
Semantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational DatabasesSemantic Graph Databases: The Evolution of Relational Databases
Semantic Graph Databases: The Evolution of Relational Databases
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDays
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 

Ähnlich wie An Introduction to NOSQL, Graph Databases and Neo4j

No Sql Movement
No Sql MovementNo Sql Movement
No Sql MovementAjit Koti
 
CSC 8101 Non Relational Databases
CSC 8101 Non Relational DatabasesCSC 8101 Non Relational Databases
CSC 8101 Non Relational Databasessjwoodman
 
Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011jexp
 
Hide the Stack: Toward Usable Linked Data
Hide the Stack:Toward Usable Linked DataHide the Stack:Toward Usable Linked Data
Hide the Stack: Toward Usable Linked Dataaba-sah
 
What is New in W3C land?
What is New in W3C land?What is New in W3C land?
What is New in W3C land?Ivan Herman
 
Linked data and the future of libraries
Linked data and the future of librariesLinked data and the future of libraries
Linked data and the future of librariesRegan Harper
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social WebBogdan Gaza
 
Introduction_to_knowledge_graph.pdf
Introduction_to_knowledge_graph.pdfIntroduction_to_knowledge_graph.pdf
Introduction_to_knowledge_graph.pdfJaberRad1
 
Linked Data (1st Linked Data Meetup Malmö)
Linked Data (1st Linked Data Meetup Malmö)Linked Data (1st Linked Data Meetup Malmö)
Linked Data (1st Linked Data Meetup Malmö)Anja Jentzsch
 
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...Linked data demystified:Practical efforts to transform CONTENTDM metadata int...
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...Cory Lampert
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBWilliam LaForest
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageBethmi Gunasekara
 
Presentation on the Warsaw Conference on National Bibliographies August 2012
Presentation on the Warsaw Conference on National Bibliographies August 2012Presentation on the Warsaw Conference on National Bibliographies August 2012
Presentation on the Warsaw Conference on National Bibliographies August 2012nw13
 

Ähnlich wie An Introduction to NOSQL, Graph Databases and Neo4j (20)

No Sql Movement
No Sql MovementNo Sql Movement
No Sql Movement
 
CSC 8101 Non Relational Databases
CSC 8101 Non Relational DatabasesCSC 8101 Non Relational Databases
CSC 8101 Non Relational Databases
 
Grails goes Graph
Grails goes GraphGrails goes Graph
Grails goes Graph
 
Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011
 
Hide the Stack: Toward Usable Linked Data
Hide the Stack:Toward Usable Linked DataHide the Stack:Toward Usable Linked Data
Hide the Stack: Toward Usable Linked Data
 
Anti-social Databases
Anti-social DatabasesAnti-social Databases
Anti-social Databases
 
What is New in W3C land?
What is New in W3C land?What is New in W3C land?
What is New in W3C land?
 
Graph Databases
Graph DatabasesGraph Databases
Graph Databases
 
Linked data and the future of libraries
Linked data and the future of librariesLinked data and the future of libraries
Linked data and the future of libraries
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social Web
 
Introduction_to_knowledge_graph.pdf
Introduction_to_knowledge_graph.pdfIntroduction_to_knowledge_graph.pdf
Introduction_to_knowledge_graph.pdf
 
Linked Data (1st Linked Data Meetup Malmö)
Linked Data (1st Linked Data Meetup Malmö)Linked Data (1st Linked Data Meetup Malmö)
Linked Data (1st Linked Data Meetup Malmö)
 
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...Linked data demystified:Practical efforts to transform CONTENTDM metadata int...
Linked data demystified:Practical efforts to transform CONTENTDM metadata int...
 
Our World is Socio-technical
Our World is Socio-technicalOur World is Socio-technical
Our World is Socio-technical
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
A theory of Metadata enriching & filtering
A theory of  Metadata enriching & filteringA theory of  Metadata enriching & filtering
A theory of Metadata enriching & filtering
 
Modern database
Modern databaseModern database
Modern database
 
Linked Data
Linked DataLinked Data
Linked Data
 
Presentation on the Warsaw Conference on National Bibliographies August 2012
Presentation on the Warsaw Conference on National Bibliographies August 2012Presentation on the Warsaw Conference on National Bibliographies August 2012
Presentation on the Warsaw Conference on National Bibliographies August 2012
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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 MenDelhi Call girls
 
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...Martijn de Jong
 
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 MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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: 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...
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

An Introduction to NOSQL, Graph Databases and Neo4j

  • 2. Database and DBMS • Database - Organized collection of data • The term database is correctly applied to the data and their supporting data structures. • DBMS - Database Management System: a software package with computer programs that controls the creation, maintenance and use of a database.
  • 3. Types of Happening Databases • Relational database – nothing new but still in use and it seems it will always be a happening one. • Cloud databases – everything is cloudy. • Data warehouse – Huge! Huge! Huge! archives. • Embedded databases – you can’t see them :P • Document oriented database – the In thing. • Hypermedia database – WWW. • Graph database – facebook, twitter, social network.
  • 5. Why NOSQL now? Driving trends
  • 6. Trend 1: Data Size 3000 2011? 2500 2000 1500 2010 1000 500 2009 2007 2008 0
  • 7. Trend 2: Connectedness GGG Onotologies RDFa Folksonomies Information connectivity Tagging Wikis UGC Blogs Feeds Hypertext Text Documents
  • 8. Trend 3: Semi-structured information • Individualisationof content – 1970’s salary lists, all elements exactly one job – 2000’s salary lists, we need many job columns! • Store more data about each entity • Trend accelerated by the decentralization of content generation – Age of participation (“web 2.0”)
  • 9. Trend 4: Architecture 1980’s: Single Application Application DB
  • 10. Trend 4: Architecture 1990’s: Integration Database Antipattern Application Application Application DB
  • 11. Trend 4: Architecture 2000’s: SOA RESTful, hypermedia, composite apps Application Application Application DB DB DB
  • 12. Side note: RDBMS performance Salary list Most Web apps Social Network Location-based services
  • 15. Key-Value Stores • “Dynamo: Amazon’s Highly Available Key- Value Store” (2007) • Data model: – Global key-value mapping – Highly fault tolerant (typically) • Examples: – Riak, Redis, Voldemort
  • 16. Column Family (BigTable) • Google’s “Bigtable: A Distributed Storage System for Structured Data” (2006) • Data model: – A big table, with column families – Map-reduce for querying/processing • Examples: – HBase, HyperTable, Cassandra
  • 17. Document Databases • Data model – Collections of documents – A document is a key-value collection – Index-centric, lots of map-reduce • Examples – CouchDB, MongoDB
  • 18. Graph Databases • Data model: – Nodes with properties – Named relationships with properties – Hypergraph, sometimes • Examples: – Neo4j (of course), SonesGraphDB, OrientDB, InfiniteGraph, AllegroGraph
  • 19. Why Graph Databases? • Schema Less and Efficient storage of Semi Structured Information • No O/R mismatch – very natural to map a graph to an Object Oriented language like Ruby. • Express Queries as Traversals. Fast deep traversal instead of slow SQL queries that span many table joins. • Very natural to express graph related problem with traversals (recommendation engine, find shortest parth etc..) • Seamless integration with various existing programming languages. • ACID Transaction with rollbacks support. • Whiteboard friendly – you use the language of node,properties and relationship to describe your domain (instead of e.g. UML) and there is no need to have a complicated O/R mapping tool to implement it in your database. You can say that Neo4j is “Whiteboard friendly” !(http://video.neo4j.org/JHU6F/live-graph- session-how-allison-knows-james/)
  • 20. Social Network “path exists” Performance • Experiment: • ~1k persons # persons query time • Average 50 friends per Relational 1000 2000ms database person • pathExists(a,b) limited to depth 4
  • 21. Social Network “path exists” Performance • Experiment: • ~1k persons # persons query time • Average 50 friends per Relational 1000 2000ms database person Neo4j 1000 2ms • pathExists(a,b) limited to depth 4
  • 22. Social Network “path exists” Performance • Experiment: • ~1k persons # persons query time • Average 50 friends per Relational 1000 2000ms database person Neo4j 1000 2ms • pathExists(a,b) Neo4j 1000000 2ms limited to depth 4
  • 23. What are graphs good for? • Recommendations • Business intelligence • Social computing • Geospatial • Systems management • Web of things • Genealogy • Time series data • Product catalogue • Web analytics • Scientific computing (especially bioinformatics) • Indexing your slow RDBMS • And much more!
  • 27. Depth First Search ?????????????????
  • 28. Graph Databases • A graph database stores data in a graph, the most generic of data structures, capable of elegantly representing any kind of data in a highly accessible way.
  • 29. Graphs • “A Graph —records data in→ Nodes —which have→ Properties”
  • 30. Graphs • “Nodes —are organized by→ Relationships — which also have→ Properties”
  • 31. Query a graph with Traversal • “A Traversal —navigates→ a Graph; it — identifies→ Paths —which order→ Nodes”
  • 32. Indexes • “An Index —maps from→ Properties —to either→ Nodes or Relationships”
  • 33. Neo4j is a Graph Database • “A Graph Database —manages a→ Graph and —also manages related→ Indexes”
  • 34. Neo4j – Hey! This is why I am a Graph Database. • The fundamental units that form a graph are nodes and relationships. • In Neo4j, both nodes and relationships can contain properties. • Nodes are often used to represent entities, but depending on the domain relationships may be used for that purpose as well.
  • 36. Relationships in Neo4j • Relationships between nodes are a key part of Neo4j.
  • 39. Properties • Both nodes and relationships can have properties. • Properties are key-value pairs where the key is a string. • Property values can be either a primitive or an array of one primitive type. For example String, int and int[] values are valid for properties.
  • 41. Paths in Neo4j • A path is one or more nodes with connecting relationships, typically retrieved as a query or traversal result.
  • 42. Traversals in Neo4j • Traversing a graph means visiting its nodes, following relationships according to some rules. • In most cases only a subgraph is visited, as you already know where in the graph the interesting nodes and relationships are found. • Traversal API • Depth first and Breadth first.
  • 45. Wrap mutating operations in a transaction.
  • 49. The Matrix Graph Database
  • 51. Resources & References • Neo4j website : http://neo4j.org/ • Neo4j learning resources: http://neo4j.org/resources/ • Videos about Neo4j: http://video.neo4j.org/ • Neo4j tutorial: http://docs.neo4j.org/chunked/snapshot/tuto rials.html • Neo4j Java API documentation: http://api.neo4j.org/current/

Hinweis der Redaktion

  1. Future stores will be mixed – right shape for the right jobPolyglot persistenceFrameworks (e.g. spring data) embracing this already
  2. UGC = User Generated ContentGGG = Giant Global Graph (what the web will become)
  3. This is strictly about connected data – joins kill performance there.No bashing of RDBMS performance for tabular transaction processingGreen line denotes “zone of SQL adequacy”
  4. Fowler points out that KV/Column/Document stores are all aggregates: they’re different from graphs because they enforce structure at design time – as an aggregate of data.Clump of data that can be co-located on a cluster instance and which is accessed together.“a fundamental unit of storage which is a rich structure of closely related data: for key-value stores it's the value, for document stores it's the document, and for column-family stores it's the column family. In DDD terms, this group of data is an aggregate.”
  5. History – Amazon decide that they always wanted the shopping basket to be available, but couldn’t take a chance on RDBMSSo they built their ownBig risk, but simple data model and well-known computing science underpinning it (e.g. consistent hashing, Bloom filters for sensible replication)+ Massive read/write scale- Simplistic data model moves heavy lifting into the app tier (e.g. map reduce)
  6. People talk about Codd’s relational model being mature because it was proposed in 1969 – 42 years old.Euler’s graph theory was proposed in 1736 – 275 years old.