SlideShare une entreprise Scribd logo
1  sur  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/

Contenu connexe

Tendances

Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Databricks
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeDatabricks
 
Introducing Neo4j
Introducing Neo4jIntroducing Neo4j
Introducing Neo4jNeo4j
 
Introduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainIntroduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainNeo4j
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use CasesMax De Marzi
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsDATAVERSITY
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesDataStax
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j FundamentalsMax De Marzi
 
Graphs for Enterprise Architects
Graphs for Enterprise ArchitectsGraphs for Enterprise Architects
Graphs for Enterprise ArchitectsNeo4j
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Designing Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDesigning Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDatabricks
 
Getting Started with Databricks SQL Analytics
Getting Started with Databricks SQL AnalyticsGetting Started with Databricks SQL Analytics
Getting Started with Databricks SQL AnalyticsDatabricks
 
Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4jNeo4j
 
Making Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMaking Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMatei Zaharia
 
Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com confluent
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsAlluxio, Inc.
 
NoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereNoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereEugene Hanikblum
 

Tendances (20)

Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Graph databases
Graph databasesGraph databases
Graph databases
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 
Graph database
Graph database Graph database
Graph database
 
Introducing Neo4j
Introducing Neo4jIntroducing Neo4j
Introducing Neo4j
 
Introduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainIntroduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & Bahrain
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use Cases
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property Graphs
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
Graphs for Enterprise Architects
Graphs for Enterprise ArchitectsGraphs for Enterprise Architects
Graphs for Enterprise Architects
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Designing Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDesigning Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things Right
 
Getting Started with Databricks SQL Analytics
Getting Started with Databricks SQL AnalyticsGetting Started with Databricks SQL Analytics
Getting Started with Databricks SQL Analytics
 
Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4j
 
Making Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMaking Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse Technology
 
Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic Datasets
 
NoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereNoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and Where
 
Snowflake Overview
Snowflake OverviewSnowflake Overview
Snowflake Overview
 

En vedette

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
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
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
 

En vedette (17)

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
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
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
 

Similaire à 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
 

Similaire à 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
 

Dernier

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Dernier (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

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/

Notes de l'éditeur

  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.