This document provides an introduction to NoSQL and Neo4j. It discusses how Neo4j is a graph database that is well-suited for storing connected data. It then demonstrates how to query the graph database using the Cypher query language, which uses a declarative pattern matching approach. Examples of real-world uses of Neo4j by companies are also presented to illustrate how it has been adopted for applications such as social networking, fraud detection, and knowledge graphs.
Introduction to graph databases, Neo4j and Spring Data - English 2015 EditionAleksander Stensby
English edition of my introduction to Neo4j and Spring Data talk - updated in February 2015 for the latest changes in Neo4j and Spring Data. The talk gives an introduction to graph databases, Neo4j and its query language Cypher. In addition, the talk covers Spring Data Neo4j.
The trend nowadays is to represent the relationships between entities in a graph structure. Neo4j is a NOSQL graph database, which allows for fast and effective queries on connected data. Implementation of own algorithms is possible, which can improve the functionality of built in API. We make use of the graph database to model and recommend movies and other media content.
Relational databases were conceived to digitize paper forms and automate well-structured business processes, and still have their uses. But RDBMS cannot model or store data and its relationships without complexity, which means performance degrades with the increasing number and levels of data relationships and data size. Additionally, new types of data and data relationships require schema redesign that increases time to market.
A native graph database like Neo4j naturally stores, manages, analyzes, and uses data within the context of connections meaning Neo4j provides faster query performance and vastly improved flexibility in handling complex hierarchies than SQL.
Introduction to graph databases, Neo4j and Spring Data - English 2015 EditionAleksander Stensby
English edition of my introduction to Neo4j and Spring Data talk - updated in February 2015 for the latest changes in Neo4j and Spring Data. The talk gives an introduction to graph databases, Neo4j and its query language Cypher. In addition, the talk covers Spring Data Neo4j.
The trend nowadays is to represent the relationships between entities in a graph structure. Neo4j is a NOSQL graph database, which allows for fast and effective queries on connected data. Implementation of own algorithms is possible, which can improve the functionality of built in API. We make use of the graph database to model and recommend movies and other media content.
Relational databases were conceived to digitize paper forms and automate well-structured business processes, and still have their uses. But RDBMS cannot model or store data and its relationships without complexity, which means performance degrades with the increasing number and levels of data relationships and data size. Additionally, new types of data and data relationships require schema redesign that increases time to market.
A native graph database like Neo4j naturally stores, manages, analyzes, and uses data within the context of connections meaning Neo4j provides faster query performance and vastly improved flexibility in handling complex hierarchies than SQL.
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
Presentation given at nosql east 2009 in Atlanta. Introduces the NOSQL space by offering a framework for categorization and discusses the benefits of graph databases. Oh, and also includes some tongue-in-cheek party poopers about sucky things in the NOSQL space.
These slides were presented as part of a W3C tutorial at the CSHALS 2010 conference (http://www.iscb.org/cshals2010). The slides are adapted from a longer introduction to the Semantic Web available at http://www.slideshare.net/LeeFeigenbaum/semantic-web-landscape-2009 .
A PDF version of the slides is available at http://thefigtrees.net/lee/sw/cshals/cshals-w3c-semantic-web-tutorial.pdf .
Building a Real-time Solr-powered Recommendation Enginelucenerevolution
Presented by Trey Grainger | CareerBuilder - See conference video - http://www.lucidimagination.com/devzone/events/conferences/lucene-revolution-2012
Searching text is what Solr is known for, but did you know that many companies receive an equal or greater business impact through implementing a recommendation engine in addition to their text search capabilities? With a few tweaks, Solr (or Lucene) can also serve as a full featured recommendation engine. Machine learning libraries like Apache Mahout provide excellent behavior-based, off-line recommendation algorithms, but what if you want more control? This talk will demonstrate how to effectively utilize Solr to perform collaborative filtering (users who liked this also liked…), categorical classification and subsequent hierarchical-based recommendations, as well as related-concept extraction and concept based recommendations. Sound difficult? It’s not. Come learn step-by-step how to create a powerful real-time recommendation engine using Apache Solr and see some real-world examples of some of these strategies in action.
Two graph data models : RDF and Property Graphsandyseaborne
Talk given at ApacheConEU Big Data 2015.
This talk describes the two common graph data approaches, RDF and Property Graphs. It concludes with observations about the different emphasis of each and where each is focused.
Although RDF can be considered the corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who want to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will briefly introduce both technologies using some examples and compare them. We will also present some challenges and applications related with RDF data shapes.
Talk given at: KTH Royal Institute of Technology, School of Industrial Engineering and Management, Mechatronics Division, 7th February, 2020
Applications of Word Vectors in Text Retrieval and Classificationshakimov
Applications of word vectors (word2vec, BERT, etc.) on problems such as text retrieval, classification of textual documents for tasks such as sentiment analysis, spam detection.
Tackling Complex Data with Neo4j by Ian RobinsonSyncConf
Today's complex data is not only big, but also semi-structured and densely connected. In this session we'll look at how size, structure and connectedness have converged to change the data world. We'll then go on to look at some of the new opportunities for creating end-user value that have emerged in a world of connected data, illustrated with practical examples implemented using Neo4j, the world's leading graph database.
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
Presentation given at nosql east 2009 in Atlanta. Introduces the NOSQL space by offering a framework for categorization and discusses the benefits of graph databases. Oh, and also includes some tongue-in-cheek party poopers about sucky things in the NOSQL space.
These slides were presented as part of a W3C tutorial at the CSHALS 2010 conference (http://www.iscb.org/cshals2010). The slides are adapted from a longer introduction to the Semantic Web available at http://www.slideshare.net/LeeFeigenbaum/semantic-web-landscape-2009 .
A PDF version of the slides is available at http://thefigtrees.net/lee/sw/cshals/cshals-w3c-semantic-web-tutorial.pdf .
Building a Real-time Solr-powered Recommendation Enginelucenerevolution
Presented by Trey Grainger | CareerBuilder - See conference video - http://www.lucidimagination.com/devzone/events/conferences/lucene-revolution-2012
Searching text is what Solr is known for, but did you know that many companies receive an equal or greater business impact through implementing a recommendation engine in addition to their text search capabilities? With a few tweaks, Solr (or Lucene) can also serve as a full featured recommendation engine. Machine learning libraries like Apache Mahout provide excellent behavior-based, off-line recommendation algorithms, but what if you want more control? This talk will demonstrate how to effectively utilize Solr to perform collaborative filtering (users who liked this also liked…), categorical classification and subsequent hierarchical-based recommendations, as well as related-concept extraction and concept based recommendations. Sound difficult? It’s not. Come learn step-by-step how to create a powerful real-time recommendation engine using Apache Solr and see some real-world examples of some of these strategies in action.
Two graph data models : RDF and Property Graphsandyseaborne
Talk given at ApacheConEU Big Data 2015.
This talk describes the two common graph data approaches, RDF and Property Graphs. It concludes with observations about the different emphasis of each and where each is focused.
Although RDF can be considered the corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who want to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will briefly introduce both technologies using some examples and compare them. We will also present some challenges and applications related with RDF data shapes.
Talk given at: KTH Royal Institute of Technology, School of Industrial Engineering and Management, Mechatronics Division, 7th February, 2020
Applications of Word Vectors in Text Retrieval and Classificationshakimov
Applications of word vectors (word2vec, BERT, etc.) on problems such as text retrieval, classification of textual documents for tasks such as sentiment analysis, spam detection.
Tackling Complex Data with Neo4j by Ian RobinsonSyncConf
Today's complex data is not only big, but also semi-structured and densely connected. In this session we'll look at how size, structure and connectedness have converged to change the data world. We'll then go on to look at some of the new opportunities for creating end-user value that have emerged in a world of connected data, illustrated with practical examples implemented using Neo4j, the world's leading graph database.
New opportunities for connected data - Ian RobinsonJAX London
Today's complex data is not only big, but also semi-structured and densely connected. In this session we'll look at how size, structure and connectedness have converged to change the data world. We'll then go on to look at some of the new opportunities for creating end-user value that have emerged in a world of connected data, illustrated with practical examples implemented using Neo4j, the world's leading graph database.
Polyglot Persistence with MongoDB and Neo4jCorie Pollock
Learn how to enhance your application by using Neo4j and MongoDB together. Polyglot persistence is the concept of taking advantage of the strengths of different database technologies to improve functionality and enhance your application. In this webinar we will examine some use cases where it makes sense to use a document database (MongoDB) with a graph database (Neo4j) in a single application. Specifically, we will show how MongoDB can be used to provide search and browsing functionality for a product catalog while using Neo4j to provide personalized product recommendations. Finally we will look at the Neo4j Doc Manager project which facilitates syncing data from MongoDB to Neo4j to make polyglot persistence with MongoDB and Neo4j much easier.
A Little Graph Theory for the Busy Developer - Jim Webber @ GraphConnect Chic...Neo4j
In this talk we'll explore powerful analytic techniques for graph data. Firstly we'll discover some of the innate properties of (social) graphs from fields like anthropology and sociology. By understanding the forces and tensions within the graph structure and applying some graph theory, we'll be able to predict how the graph will evolve over time. To test just how powerful and accurate graph theory is, we'll also be able to (retrospectively) predict World War 1 based on a social graph and a few simple mechanical rules.
Then we'll see how graph matching can be used to extract online business intelligence (for powerful retail recommendations). In turn we'll apply these powerful techniques to modelling domains in Neo4j (a graph database) and show how Neo4j can be used to drive business intelligence.
Don't worry, there won't be much maths :-)
A presentation on mashing up Twitter Annotations with the Semantic Web. June 24, 2010 at the Semantic Technology Conference, San Francisco (SemTech 2010).
Lecture Notes by Mustafa Jarrar at Birzeit University, Palestine.
See the course webpage at: http://jarrar-courses.blogspot.com/2014/01/sparql-rdf-query-language.html
and http://www.jarrar.info
The lecture covers:
- SPARQL Basics
- SPARQL Practical Session
This is the presentation given by Michael Hunger and Peter Neubauer at the SF Data Mining group, see http://www.meetup.com/Data-Mining/events/80275492/
Given by Peter Neubuaer at OSON 2012:
You know the drill – prototype, code, test, docs. The last part of the chain is either omitted or will rot in Wikis and manuals. At Neo4j, we made the painful switch from wiki-hell to a totally code – backed manual that is driven by unit tests, a documentation toolchain and part of our build artifacts. Graph images, code snippets, live REST calls and everything. And still not getting in the way of the developers. We are now writing test code that is fit for publishing as blog links to parts of the manual. And developers are looking at the manual to see if the tests make sense. Want that? Hell yeah
This presentation was introducing neo4j at http://www.meetup.com/PolyglotVancouver/events/68860272/, covering both Neo4j and some of the Manual toolchain powering docs.neo4j.org for the project (the manual source can be found at http://github.com/neo4j/manual ).
This is a presentation given at http://nosql-matters.org 2012 and at the JUG in Toulouse and Bordeaux.
The links are referring to the great introduction to Cypher by Max De Marci, http://www.slideshare.net/maxdemarzi/cypher-12154713 and the Neo4j online Cypher Cookbook section, http://docs.neo4j.org/chunked/snapshot/cypher-cookbook.html
Intro to Neo4j or why insurances should love graphsPeter Neubauer
This talk covers a basic intro of graphs, NOSQL and graph databases, followed b a number of domain examples and case studies, and a section on how graph databases can be interesting in the domain of insurance companies.
Compelling location-based services require more than simple “what’s near me?” operations. The Open Street Map dataset is a perfect example of a rich geographically-based wiki that can be used for much more than map rendering.
With the newly released Neo4j Spatial, any data can be adapted to complex queries with geographic components like “Select all streets in the Municipality of NYC where at least 2 of my friends are walking right now”.
The talk will demonstrate the important benefits of modeling geodata in a graph, the main components needed to expose data to geo stacks like map servers, and explain how the Open Street Map dataset is modeled in Neo4j. I’ll show how using Neo4j unlocks the full potential of the OSM data far beyond just rendering maps.
There will also be some cool examples of Neo4j Spatial, from Telecomms network planning, Web-based AJAX GIS systems, topology editing and routing to REST and Web Feature Service endpoints, all in a single stack.
This is Location-based Services on steroids!
In the Telecommunications sector, there are a lot of complex data sets and problems that are well suited for graph models and the use of graph databases like Neo4j.
This talk gives just some ideas on where Neo4j currently is used within the TelCo sector. If you recognize problem areas that you have, don't hesitate to contact me at peter at neotechnology dot com, we are eager to learn more and help!
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
14. Early Adopter Segments
(What we expected to happen - view from several years ago)
Core Industries
& Use Cases:
Web / ISV
Finance &
Insurance
Network & Data Center
Management
MDM
Social
Geo
Neo Technology, Inc Confidential
Datacom /
Telecom
15. Neo4j Adoption Snapshot
Select Commercial Customers* Across Anticipated Segments
Core Industries
& Use Cases:
Web / ISV
Network & Data Center
Management
MDM
Social
Geo
*Community Users Not Included
Neo Technology, Inc Confidential
Financial
Services
Telecommunications
16. Neo4j Adoption Snapshot
Select Commercial Customers* Across Anticipated Segments
Core Industries
& Use Cases:
Web / ISV
Finance &
Insurance
Network & Data Center
Management
MDM
Social
Geo
Neo Technology, Inc Confidential
Telecommunications
17. Neo4j Adoption Snapshot
Select Commercial Customers* Across Anticipated Segments
Core Industries
Core Industries
& & Use Cases:
Use Cases:
Web / ISV
Software
Finance &
Financial
Insurance
Services
TelecommTelecommu Health Care &
unications
Life Sciences
nications
Web Social,
HR & Recruiting
Media &
Publishing
Energy, Services,
Automotive, Gov’t,
Logistics, Education,
Gaming, Other
Network & DataData
Network & Center
Management
Center Management
MDM / System of
MDM
Record
Social
Social
Accentur
e
Geo
Geo
Recommend-ations
Identity & Access
Mgmt
Finance
Content
Management
BI, CRM, Impact Analysis,
Fraud Detection, Resource
Optimization, etc.
Neo Technology, Inc Confidential
Energy
Aerospace
21. A graph database...
NO: not for charts diagrams, or vector artwork
YES: for storing data that is structured as a graph
8
22. A graph database...
NO: not for charts diagrams, or vector artwork
YES: for storing data that is structured as a graph
remember linked lists, trees?
8
23. A graph database...
NO: not for charts diagrams, or vector artwork
YES: for storing data that is structured as a graph
remember linked lists, trees?
graphs are the general-purpose data structure
8
24. A graph database...
NO: not for charts diagrams, or vector artwork
YES: for storing data that is structured as a graph
remember linked lists, trees?
graphs are the general-purpose data structure
“A relational database may tell you the average age of everyone
in this session,
but a graph database will tell you who is most likely to buy you a
beer.”
8
45. We're talking about a
Property Graph
Joh
Em
il
knows
knows
Nodes
Alli
Tob
i
as
knows
Lar
An d
son
knows
knows
An d
knows
rea
s
Pet
er
Miic
Mc
a
a
knows
knows
rés
knows
knows
Relationships
an
s
knows
knows
Ian
knows
De
lia
Mi c
hae
l
Properties (each a key+value)
Labels (constraints, Indexes for look-ups)
10
50. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
11
51. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
11
52. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
11
53. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
# persons
Relational database 1 000
query time
2000ms
11
54. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
# persons
Relational database 1 000
Neo4j 1 000
query time
2000ms
2ms
11
55. Looks different, fine. Who cares?
๏ a sample social graph
• with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
# persons
Relational database 1 000
query time
2000ms
Neo4j 1 000
2ms
Neo4j 1 000 000
2ms
11
57. Graph Database: Pros Cons
๏ Strengths
• Powerful data model, as general as RDBMS
• Fast, for connected data
• Easy to query
๏ Weaknesses:
• Sharding (though they can scale reasonably well)
‣also, stay tuned for developments here
• Requires conceptual shift
‣though graph-like thinking becomes addictive
12
58. Show me some code, please
GraphDatabaseService graphDb =
new EmbeddedGraphDatabase(“var/neo4j”);
Transaction tx = graphDb.beginTx();
try {
Node steve = graphDb.createNode();
Node michael = graphDb.createNode();
!
steve.setProperty(“name”, “Steve Vinoski”);
michael.setProperty(“name”, “Michael Hunger”);
!
Relationship presentedWith = steve.createRelationshipTo(
michael, PresentationTypes.PRESENTED_WITH);
presentedWith.setProperty(“date”, today);
tx.success();
} finally {
tx.finish();
}
60. Spring Data Neo4j
@NodeEntity
public class Movie {
@Indexed private String title;
@RelatedToVia(type = “ACTS_IN”, direction=INCOMING)
private SetRole cast;
private Director director;
}
!
@NodeEntity
public class Actor {
@RelatedTo(type = “ACTS_IN”)
private SetMovies movies;
}
!
@RelationshipEntity
public class Role {
@StartNode private Actor actor;
@EndNode private Movie movie;
private String roleName;
}
61. neo4j.rb
gem install neo4j
!
require 'rubygems'
require 'neo4j'
!
class Person
include Neo4j::NodeMixin
property :name, :age, :rank
index :name
has_n :friends
end
!
Neo4j::Transaction.run do
neo = Person.new :name='Neo', :age=29
morpheus =
Person.new :name='Morpheus', :rank='Captain'
neo.friends morpheus
end
!
neo.friends.each {|p|...}