This document provides an introduction to data modeling with Neo4j. It discusses modeling complex data as a graph using nodes, relationships, properties and labels. It introduces Neo4j as a graph database and its data model of labeled property graphs. It also provides an overview of the Cypher query language and includes an example of modeling a domain to find people with similar skills within a company.
This presentation covers several aspects of modeling data and domains with a graph database like Neo4j. The graph data model allows high fidelity modeling. Using the first class relationships of the graph model allow to use much higher forms of normalization than you would use in a relational database.
Video here: https://vimeo.com/67371996
Social phenomena is coming. We have lot’s of social applications that we are using every day, let’s say Facebook, twitter, Instagram. Lot’s of such kind apps based on social graph and graph theory. I would like to share my knowledge and expertise about how to work with graphs and build large social graph as engine for Social network using python and Graph databases. We'll compare SQL and NoSQL approaches for friends relationships.
This presentation covers several aspects of modeling data and domains with a graph database like Neo4j. The graph data model allows high fidelity modeling. Using the first class relationships of the graph model allow to use much higher forms of normalization than you would use in a relational database.
Video here: https://vimeo.com/67371996
Social phenomena is coming. We have lot’s of social applications that we are using every day, let’s say Facebook, twitter, Instagram. Lot’s of such kind apps based on social graph and graph theory. I would like to share my knowledge and expertise about how to work with graphs and build large social graph as engine for Social network using python and Graph databases. We'll compare SQL and NoSQL approaches for friends relationships.
(** MYSQL DBA Certification Training https://www.edureka.co/mysql-dba **)
This Edureka PPT on SQL Joins will discuss the various types of Joins used in SQL Server with examples. The following topics will be covered in this PPT:
Introduction to SQL
What are Joins?
Types of Joins
FAQs about Joins
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
SQLcl overview - A new Command Line Interface for Oracle DatabaseJeff Smith
From the makers of Oracle SQL Developer, we present you a new take on SQL*Plus. A command line interface with a SQL history, table name completion, new commands like CTAS, DDL, Info, and simple things like editing your statement buffers using your keyboard up and down arrow keys!
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.
Presentation that I gave as a guest lecture for a summer intensive development course at nod coworking in Dallas, TX. The presentation targets beginning web developers with little, to no experience in databases, SQL, or PostgreSQL. I cover the creation of a database, creating records, reading/querying records, updating records, destroying records, joining tables, and a brief introduction to transactions.
Maps and Meaning: Graph-based Entity Resolution in Apache Spark & GraphXDatabricks
Data integration and the automation of tedious data extraction tasks are the fundamental building blocks of a data-driven organizations and are overlooked or underestimated at times. Aside from data extraction, scraping and ETL tasks, entity resolution is a crucial step in successfully combining datasets. The combination of data sources is usually what provides richness in features and variance. Building an expertise in entity resolution is important for data engineerings to successfully combine data sources. Graph-based entity resolution algorithms have emerged as a highly effective approach.
This talk will present the implementation of a graph-bases entity resolution technique in GraphX and in GraphFrames respectively. Working from concept, through how to implement the algorithm in Spark, the technique will also be illustrated by walking through a practical example. The technique will exhibit an example where efficacy can be achieved based on simple heuristics, and at the same time map a path to a machine-learning assisted entity resolution engine with a powerful knowledge graph at its center.
The role of ML can be found upstream in building the graph, for example by using classification algorithms in determining the link strength between nodes based on data, or downstream where dimensionality reduction can play a role in clustering and reduce the computational load in the resolution stage. The audience will leave with a clear picture of a scalable data pipeline performing entity resolution effectively and a thorough understanding of the internal mechanism, ready to apply it to their use cases.
Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more.
How Graph Databases efficiently store, manage and query connected data at s...jexp
Graph Databases try to make it easy for developers to leverage huge amounts of connected information for everything from routing to recommendations. Doing that poses a number of challenges on the implementation side. In this talk we want to look at the different storage, query and consistency approaches that are used behind the scenes. We’ll check out current and future solutions used in Neo4j and other graph databases for addressing global consistency, query and storage optimization, indexing and more and see which papers and research database developers take inspirations from.
I would strongly recommend that you check out the on-demand webinar, as I go into the details that are missing from the slide deck alone:
http://www.mysql.com/news-and-events/web-seminars/geographic-information-systems-gis-in-mysql-5-7-for-web-mobile-applications/
That being said, here's the slide deck. :)
P.S. Stay tuned for even more new GIS features and enhancements coming in MySQL 5.7.6!
A comparison of different solutions for full-text search in web applications using PostgreSQL and other technology. Presented at the PostgreSQL Conference West, in Seattle, October 2009.
The openCypher Project - An Open Graph Query LanguageNeo4j
We want to present the openCypher project, whose purpose is to make Cypher available to everyone – every data store, every tooling provider, every application developer. openCypher is a continual work in progress. Over the next few months, we will move more and more of the language artifacts over to GitHub to make it available for everyone.
openCypher is an open source project that delivers four key artifacts released under a permissive license: (i) the Cypher reference documentation, (ii) a Technology compatibility kit (TCK), (iii) Reference implementation (a fully functional implementation of key parts of the stack needed to support Cypher inside a data platform or tool) and (iv) the Cypher language specification.
We are also seeking to make the process of specifying and evolving the Cypher query language as open as possible, and are actively seeking comments and suggestions on how to improve the Cypher query language.
The purpose of this talk is to provide more details regarding the above-mentioned aspects.
We want to present the openCypher project, whose purpose is to make Cypher available to everyone – every data store, every tooling provider, every application developer. openCypher is a continual work in progress. Over the next few months, we will move more and more of the language artifacts over to GitHub to make it available for everyone.
openCypher is an open source project that delivers four key artifacts released under a permissive license: (i) the Cypher reference documentation, (ii) a Technology compatibility kit (TCK), (iii) Reference implementation (a fully functional implementation of key parts of the stack needed to support Cypher inside a data platform or tool) and (iv) the Cypher language specification.
We are also seeking to make the process of specifying and evolving the Cypher query language as open as possible, and are actively seeking comments and suggestions on how to improve the Cypher query language.
The purpose of this talk is to provide more details regarding the above-mentioned aspects.
Introducing new features in Apache Pinot. In this talk, we will go over indexing support in Pinot, recently added text indexing feature, SQL support, and cloud readiness.
Introduction to Graph database, using K-pop as a database modelling case. From the idea of graph database, Neo4j installation, modelling, Cypher to business application.
Family tree of data – provenance and neo4jM. David Allen
Discusses data provenance and how it can be implemented in neo4j, as well as many lessons learned about the relative strengths and weaknesses of relational and graph databases.
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...jaxLondonConference
Presented at JAX London
In this session we'll look at some of the design and implementation strategies you can employ when building a Neo4j-based graph database solution, including architectural choices, data modelling, and testing.
(** MYSQL DBA Certification Training https://www.edureka.co/mysql-dba **)
This Edureka PPT on SQL Joins will discuss the various types of Joins used in SQL Server with examples. The following topics will be covered in this PPT:
Introduction to SQL
What are Joins?
Types of Joins
FAQs about Joins
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
SQLcl overview - A new Command Line Interface for Oracle DatabaseJeff Smith
From the makers of Oracle SQL Developer, we present you a new take on SQL*Plus. A command line interface with a SQL history, table name completion, new commands like CTAS, DDL, Info, and simple things like editing your statement buffers using your keyboard up and down arrow keys!
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.
Presentation that I gave as a guest lecture for a summer intensive development course at nod coworking in Dallas, TX. The presentation targets beginning web developers with little, to no experience in databases, SQL, or PostgreSQL. I cover the creation of a database, creating records, reading/querying records, updating records, destroying records, joining tables, and a brief introduction to transactions.
Maps and Meaning: Graph-based Entity Resolution in Apache Spark & GraphXDatabricks
Data integration and the automation of tedious data extraction tasks are the fundamental building blocks of a data-driven organizations and are overlooked or underestimated at times. Aside from data extraction, scraping and ETL tasks, entity resolution is a crucial step in successfully combining datasets. The combination of data sources is usually what provides richness in features and variance. Building an expertise in entity resolution is important for data engineerings to successfully combine data sources. Graph-based entity resolution algorithms have emerged as a highly effective approach.
This talk will present the implementation of a graph-bases entity resolution technique in GraphX and in GraphFrames respectively. Working from concept, through how to implement the algorithm in Spark, the technique will also be illustrated by walking through a practical example. The technique will exhibit an example where efficacy can be achieved based on simple heuristics, and at the same time map a path to a machine-learning assisted entity resolution engine with a powerful knowledge graph at its center.
The role of ML can be found upstream in building the graph, for example by using classification algorithms in determining the link strength between nodes based on data, or downstream where dimensionality reduction can play a role in clustering and reduce the computational load in the resolution stage. The audience will leave with a clear picture of a scalable data pipeline performing entity resolution effectively and a thorough understanding of the internal mechanism, ready to apply it to their use cases.
Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more.
How Graph Databases efficiently store, manage and query connected data at s...jexp
Graph Databases try to make it easy for developers to leverage huge amounts of connected information for everything from routing to recommendations. Doing that poses a number of challenges on the implementation side. In this talk we want to look at the different storage, query and consistency approaches that are used behind the scenes. We’ll check out current and future solutions used in Neo4j and other graph databases for addressing global consistency, query and storage optimization, indexing and more and see which papers and research database developers take inspirations from.
I would strongly recommend that you check out the on-demand webinar, as I go into the details that are missing from the slide deck alone:
http://www.mysql.com/news-and-events/web-seminars/geographic-information-systems-gis-in-mysql-5-7-for-web-mobile-applications/
That being said, here's the slide deck. :)
P.S. Stay tuned for even more new GIS features and enhancements coming in MySQL 5.7.6!
A comparison of different solutions for full-text search in web applications using PostgreSQL and other technology. Presented at the PostgreSQL Conference West, in Seattle, October 2009.
The openCypher Project - An Open Graph Query LanguageNeo4j
We want to present the openCypher project, whose purpose is to make Cypher available to everyone – every data store, every tooling provider, every application developer. openCypher is a continual work in progress. Over the next few months, we will move more and more of the language artifacts over to GitHub to make it available for everyone.
openCypher is an open source project that delivers four key artifacts released under a permissive license: (i) the Cypher reference documentation, (ii) a Technology compatibility kit (TCK), (iii) Reference implementation (a fully functional implementation of key parts of the stack needed to support Cypher inside a data platform or tool) and (iv) the Cypher language specification.
We are also seeking to make the process of specifying and evolving the Cypher query language as open as possible, and are actively seeking comments and suggestions on how to improve the Cypher query language.
The purpose of this talk is to provide more details regarding the above-mentioned aspects.
We want to present the openCypher project, whose purpose is to make Cypher available to everyone – every data store, every tooling provider, every application developer. openCypher is a continual work in progress. Over the next few months, we will move more and more of the language artifacts over to GitHub to make it available for everyone.
openCypher is an open source project that delivers four key artifacts released under a permissive license: (i) the Cypher reference documentation, (ii) a Technology compatibility kit (TCK), (iii) Reference implementation (a fully functional implementation of key parts of the stack needed to support Cypher inside a data platform or tool) and (iv) the Cypher language specification.
We are also seeking to make the process of specifying and evolving the Cypher query language as open as possible, and are actively seeking comments and suggestions on how to improve the Cypher query language.
The purpose of this talk is to provide more details regarding the above-mentioned aspects.
Introducing new features in Apache Pinot. In this talk, we will go over indexing support in Pinot, recently added text indexing feature, SQL support, and cloud readiness.
Introduction to Graph database, using K-pop as a database modelling case. From the idea of graph database, Neo4j installation, modelling, Cypher to business application.
Family tree of data – provenance and neo4jM. David Allen
Discusses data provenance and how it can be implemented in neo4j, as well as many lessons learned about the relative strengths and weaknesses of relational and graph databases.
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...jaxLondonConference
Presented at JAX London
In this session we'll look at some of the design and implementation strategies you can employ when building a Neo4j-based graph database solution, including architectural choices, data modelling, and testing.
Designing and Building a Graph Database Application – Architectural Choices, ...Neo4j
Ian closely looks at design and implementation strategies you can employ when building a Neo4j-based graph database solution, including architectural choices, data modelling, and testing.g
Graph Databases in the Microsoft EcosystemMarco Parenzan
With SQL Server and Cosmos Db we now have graph databases broadly available, after being studied for decades in Db theory, or being a niche approach in Open Source with Neo4J. And then there are services like Microsoft Graph and Azure Digital Twins that give us vertical implementations of graph. So let's make a walkaround of graphs in the MIcrosoft ecosystem.
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AILuigi Fugaro
Redis è conosciuto come un database in tempo reale che può essere utilizzato come cache, per memorizzare sessioni utente o immagazzinare token d’autenticazione, documenti JSON, per gestire inventari in tempo reale, dati geografici, come feature store in scenari di machine learning, gestione di code, broker, stream e molto altro. Ma non tutti sanno che Redis può memorizzare e indicizzare vettori di embeddings, ovvero quelle strutture dati che sono alla base di applicativi come ChatGPT. In questo talk, esploreremo come utilizzare Redis come un database vettoriale per implementare casi d’uso moderni.
No se pierda esta oportunidad de conocer las ventajas de NoSQL. Participe en nuestro seminario web y descubra:
Qué significa el término NoSQL
Qué diferencias hay entre los almacenes clave-valor, columna ancha, grafo y de documentos
Qué significa el término «multimodelo»
Outrageous ideas for Graph Databases
Almost every graph database vendor raised money in 2021. I am glad they did, because they are going to need the money. Our current Graph Databases are terrible and need a lot of work. There I said it. It's the ugly truth in our little niche industry. That's why despite waiting for over a decade for the "Year of the Graph" to come we still haven't set the world on fire. Graph databases can be painfully slow, they can't handle non-graph workloads, their APIs are clunky, their query languages are either hard to learn or hard to scale. Most graph projects require expert shepherding to succeed. 80% of the work takes 20% of the time, but that last 20% takes forever. The graph database vendors optimize for new users, not grizzly veterans. They optimize for sales not solutions. Come listen to a Rant by an industry OG on where we could go from here if we took the time to listen to the users that haven't given up on us yet.
Outrageous ideas for Graph Databases
Almost every graph database vendor raised money in 2021. I am glad they did, because they are going to need the money. Our current Graph Databases are terrible and need a lot of work. There I said it. It's the ugly truth in our little niche industry. That's why despite waiting for over a decade for the "Year of the Graph" to come we still haven't set the world on fire. Graph databases can be painfully slow, they can't handle non-graph workloads, their APIs are clunky, their query languages are either hard to learn or hard to scale. Most graph projects require expert shepherding to succeed. 80% of the work takes 20% of the time, but that last 20% takes forever. The graph database vendors optimize for new users, not grizzly veterans. They optimize for sales not solutions. Come listen to a Rant by an industry OG on where we could go from here if we took the time to listen to the users that haven't given up on us yet.
Los estafadores ahora están utilizando métodos más sofisticados y dinámicos con tarjetas de crédito, el blanqueo de dinero y otros tipos de fraude. El aprovechamiento de la tecnología gráfica le permitirá ver más allá de los puntos de datos individuales y descubrir patrones difíciles de detectar.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
2. Topics
• Data
complexity
• Graph
model
building
blocks
• Quick
intro
to
Cypher
• Modeling
guidelines
• Common
graph
structures
• Evolving
a
graph
model
12. Nodes
• Used
to
represent
en##es
and
complex
value
types
in
your
domain
• Can
contain
properJes
– Used
to
represent
enJty
a1ributes
and/or
metadata
(e.g.
Jmestamps,
version)
– Key-‐value
pairs
• Java
primiJves
• Arrays
• null
is
not
a
valid
value
– Every
node
can
have
different
properJes
13. EnJJes
and
Value
Types
• EnJJes
– Have
unique
conceptual
idenJty
– Change
aXribute
values,
but
idenJty
remains
the
same
• Value
types
– No
conceptual
idenJty
– Can
subsJtute
for
each
other
if
they
have
the
same
value
• Simple:
single
value
(e.g.
colour,
category)
• Complex:
mulJple
aXributes
(e.g.
address)
15. RelaJonships
• Every
relaJonship
has
a
name
and
a
direc#on
– Add
structure
to
the
graph
– Provide
semanJc
context
for
nodes
• Can
contain
properJes
– Used
to
represent
quality
or
weight
of
relaJonship,
or
metadata
• Every
relaJonship
must
have
a
start
node
and
end
node
– No
dangling
relaJonships
16. RelaJonships
(conJnued)
Nodes
can
have
more
than
one
relaJonship
Self
relaJonships
are
allowed
Nodes
can
be
connected
by
more
than
one
relaJonship
17. Variable
Structure
• RelaJonships
are
defined
with
regard
to
node
instances,
not
classes
of
nodes
– Two
nodes
represenJng
the
same
kind
of
“thing”
can
be
connected
in
very
different
ways
• Allows
for
structural
variaJon
in
the
domain
– Contrast
with
relaJonal
schemas,
where
foreign
key
relaJonships
apply
to
all
rows
in
a
table
• No
need
to
use
null
to
represent
the
absence
of
a
connecJon
19. Labels
• Every
node
can
have
zero
or
more
labels
• Used
to
represent
roles
(e.g.
user,
product,
company)
– Group
nodes
– Allow
us
to
associate
indexes
and
constraints
with
groups
of
nodes
20. Four
Building
Blocks
• Nodes
– EnJJes
• RelaJonships
– Connect
enJJes
and
structure
domain
• ProperJes
– EnJty
aXributes,
relaJonship
qualiJes,
and
metadata
• Labels
– Group
nodes
by
role
33. Example
ApplicaJon
• Knowledge
management
– People,
companies,
skills
– Cross
organizaJonal
• Find
my
professional
social
network
– Exchange
knowledge
– Interest
groups
– Help
– Staff
projects
34. ApplicaJon/End-‐User
Goals
As
an
employee
I
want
to
know
who
in
the
company
has
similar
skills
to
me
So
that
we
can
exchange
knowledge
35. QuesJons
To
Ask
of
the
Domain
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
As
an
employee
I
want
to
know
who
in
the
company
has
similar
skills
to
me
So
that
we
can
exchange
knowledge
36. IdenJfy
EnJJes
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
Person
Company
Skill
37. IdenJfy
RelaJonships
Between
EnJJes
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
Person
WORKS_FOR
Company
Person
HAS_SKILL
Skill
38. Convert
to
Cypher
Paths
Person
WORKS_FOR
Company
Person
HAS_SKILL
Skill
RelaJonship
Label
(:Person)-[:WORKS_FOR]->(:Company),
(:Person)-[:HAS_SKILL]->(:Skill)
41. Express
QuesJon
as
Graph
PaXern
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
42. Cypher
Query
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
MATCH (company)<-[:WORKS_FOR]-(:Person{name:'Ian'})
-[:HAS_SKILL]->(skill),
(company)<-[:WORKS_FOR]-(colleague)-[:HAS_SKILL]->(skill)
RETURN colleague.name AS name,
count(skill) AS score,
collect(skill.name) AS skills
ORDER BY score DESC
43. Graph
PaXern
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
MATCH (company)<-[:WORKS_FOR]-(:Person{name:'Ian'})
-[:HAS_SKILL]->(skill),
(company)<-[:WORKS_FOR]-(colleague)-[:HAS_SKILL]->(skill)
RETURN colleague.name AS name,
count(skill) AS score,
collect(skill.name) AS skills
ORDER BY score DESC
44. Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
MATCH (company)<-[:WORKS_FOR]-(:Person{name:'Ian'})
-[:HAS_SKILL]->(skill),
(company)<-[:WORKS_FOR]-(colleague)-[:HAS_SKILL]->(skill)
RETURN colleague.name AS name,
count(skill) AS score,
collect(skill.name) AS skills
ORDER BY score DESC
Anchor
PaXern
in
Graph
Search
nodes
labeled
‘Person’,
matching
on
‘name’
property
45. Create
ProjecJon
of
Results
Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
MATCH (company)<-[:WORKS_FOR]-(:Person{name:'Ian'})
-[:HAS_SKILL]->(skill),
(company)<-[:WORKS_FOR]-(colleague)-[:HAS_SKILL]->(skill)
RETURN colleague.name AS name,
count(skill) AS score,
collect(skill.name) AS skills
ORDER BY score DESC
50. From
User
Story
to
Model
and
Query
MATCH (company)<-[:WORKS_FOR]-(me:Person)-[:HAS_SKILL]->(skill),
(company)<-[:WORKS_FOR]-(colleague)-[:HAS_SKILL]->(skill)
WHERE me.name = {name}
RETURN colleague.name AS name,
count(skill) AS score,
collect(skill.name) AS skills
ORDER BY score DESC
As
an
employee
I
want
to
know
who
in
the
company
has
similar
skills
to
me
So
that
we
can
exchange
knowledge
(:Company)<-[:WORKS_FOR]-(:Person)-[:HAS_SKILL]->(:Skill)
Person
WORKS_FOR
Company
Person
HAS_SKILL
Skill
?Which
people,
who
work
for
the
same
company
as
me,
have
similar
skills
to
me?
58. Use
RelaJonships
When…
• You
need
to
specify
the
weight,
strength,
or
some
other
quality
of
the
rela#onship
• AND/OR
the
aXribute
value
comprises
a
complex
value
type
(e.g.
address)
• Examples:
– Find
all
my
colleagues
who
are
level
2
or
above
(relaJonship
quality)
in
a
skill
(aXribute
value)
we
have
in
common
– Find
all
recent
orders
delivered
to
the
same
delivery
address
(complex
value
type)
60. Use
ProperJes
When…
• There’s
no
need
to
qualify
the
relaJonship
• AND
the
aXribute
value
comprises
a
simple
value
type
(e.g.
colour)
• Examples:
– Find
those
projects
wriXen
by
contributors
to
my
projects
that
use
the
same
language
(aXribute
value)
as
my
projects
62. If
Performance
is
CriJcal…
• Small
property
lookup
on
a
node
will
be
quicker
than
traversing
a
relaJonship
– But
traversing
a
relaJonship
is
sJll
faster
than
a
SQL
join…
• However,
many
small
proper#es
on
a
node,
or
a
lookup
on
a
large
string
or
large
array
property
will
impact
performance
– Always
performance
test
against
a
representaJve
dataset
64. Align
With
Use
Cases
• RelaJonships
are
the
“royal
road”
into
the
graph
• When
querying,
well-‐named
relaJonships
help
discover
only
what
is
absolutely
necessary
– And
eliminate
unnecessary
porJons
of
the
graph
from
consideraJon
73. Create
Some
More
Data
• Create
more
people
– Same
skills
(Neo4j
and
REST)
– Same
company
(Acme)
• View
the
results
– MATCH (n) RETURN n
74. Your
Turn
• Clean
the
database
• Execute
create-‐2.txt,
create-‐3.txt
and
create-‐4.txt
– Ajer
each
operaJon,
view
the
results
• What
happens
if
you
add
or
remove
properJes
when
specifying
unique
nodes
and
relaJonships?
78. Set
RelaJonship
ProperJes
MERGE (c:Company{name:'Acme'})
MERGE (p:Person{username:'ian'})
MERGE (s1:Skill{name:'Java'})
MERGE (s2:Skill{name:'C#'})
MERGE (s3:Skill{name:'Neo4j'})
MERGE (c)<-[:WORKS_FOR]-(p)
MERGE (p)-[r1:HAS_SKILL]->(s1)
MERGE (p)-[r2:HAS_SKILL]->(s2)
MERGE (p)-[r3:HAS_SKILL]->(s3)
SET r1.level = 2
SET r2.level = 2
SET r3.level = 3
RETURN c, p, s1, s2, s3
79. MERGE
MERGE
ensures
that
a
paXern
exists
in
the
graph.
Either
the
paXern
already
exists,
or
it
needs
to
be
created.
http://docs.neo4j.org/chunked/milestone/query-merge.html
85. ConsideraJons
• An
intermediate
node
provides
flexibility
– It
allows
more
than
two
nodes
to
be
connected
in
a
single
context
• But
it
can
be
overkill,
and
will
have
an
impact
on
performance
86. Linked
Lists
• EnJJes
are
linked
in
a
sequence
• You
need
to
traverse
the
sequence
• You
may
need
to
idenJfy
the
beginning
or
end
(first/last,
earliest/latest,
etc.)
• Examples
– Event
stream
– Episodes
of
a
TV
series
– Job
history
92. Season
12
of
Doctor
Who
• Add
stories
as
they
are
broadcast
– Maintain
pointer
to
FIRST
and
LAST
stories
broadcast
• Find
all
stories
broadcast
so
far
• Find
latest
story
broadcast
so
far
93. Your
Turn
• Clean
the
database
• Execute
setup.txt
– Creates
root
season
node
• Execute
add-‐node.txt
– Adds
Robot
• Modify
the
query
to
add
more
stories
in
broadcast
order
• At
each
stage,
view
the
results
– MATCH
(n)
RETURN
n
94. Add
Story
to
Season
MERGE (season:Season{season:12})
MERGE (season)-[:LAST]->(newStory:Story{title:'Robot'})
WITH season, newStory
// Determine whether first story already exists
WITH season, newStory,
CASE WHEN NOT ((season)-[:FIRST]->()) THEN [1] ELSE []
END
AS firstExists
// Create FIRST rel newStory is first story
FOREACH (i IN firstExists | MERGE (season)-[:FIRST]->(newStory))
WITH season, newStory
// Delete old LAST relationship
MATCH (newStory)<-[:LAST]-(season)-[oldRel:LAST]->(oldLast)
DELETE oldRel
MERGE (oldLast)-[:NEXT]->(newStory)
95. Query-‐1
-‐
Find
All
Stories
Broadcast
So
Far
MATCH (season:Season)-[:FIRST]->(firstStory)
-[:NEXT*0..]->(nextStory)
RETURN nextStory.title AS nextStory
96. Query-‐2
-‐
Find
Last
Story
to
be
Broadcast
MATCH (season:Season)-[:LAST]->(lastStory)
RETURN lastStory.title AS lastStory
98. Timeline
Tree
• Discrete
events
– No
natural
relaJonships
to
other
events
• You
need
to
find
events
at
differing
levels
of
granularity
– Between
two
days
– Between
two
months
– Between
two
minutes
105. Query-‐1
-‐
Get
All
Events
Between
Two
Dates
MATCH (timeline:Timeline{name:'timeline-1'})
-[:YEAR]->(y)
-[:MONTH]->(m)
-[:DAY]->(d)<-[:OCCURRED]-(n)
WHERE (y.value > {startYear} AND y.value < {endYear})
OR ({startYear} = {endYear})
OR (y.value = {startYear}
AND ((m.value > {startMonth})
OR (m.value = {startMonth}
AND d.value >= {startDay})))
OR (y.value = {endYear}
AND ((m.value < {endMonth})
OR (m.value = {endMonth}
AND d.value <= {endDay})))
RETURN n.name,
(d.value + "-" + m.value + "-" + y.value) AS date
110. Versioning
Graphs
• Time-‐based
– Universal
versioning
schema
– Discrete,
conJnuous
sequence
• Millis
since
the
epoch
111. Separate
Structure
from
State
• Structure
– IdenJty
nodes
• Placeholders
– Timestamped
idenJty
relaJonships
• i.e.
normal
domain
relaJonships
• State
– State
nodes
• Snapshot
of
enJty
state
– Timestamped
state
relaJonships
114. Find
Current
Structural
RelaJonship
MATCH (p:Product{product_id:1})<-[r:SELLS]-(:Shop)
WHERE r.to = 9223372036854775807
MATCH (s:Shop{shop_id:2})
SET r.to = 1391212800000
CREATE (s)
-[:SELLS{from:1391212800000,to:9223372036854775807}]->(p)
9223372036854775807
=
End
of
Time
=
EOT
115. Archive
Structural
RelaJonship
MATCH (p:Product{product_id:1})<-[r:SELLS]-(:Shop)
WHERE r.to = 9223372036854775807
MATCH (s:Shop{shop_id:2})
SET r.to = 1391212800000
CREATE (s)
-[:SELLS{from:1391212800000,to:9223372036854775807}]->(p)
116. Create
New
Structural
RelaJonship
MATCH (p:Product{product_id:1})<-[r:SELLS]-(:Shop)
WHERE r.to = 9223372036854775807
MATCH (s:Shop{shop_id:2})
SET r.to = 1391212800000
CREATE (s)
-[:SELLS{from:1391212800000,to:9223372036854775807}]->(p)
118. All
Products
Sold
by
Shop
1
on
5
January
2014
MATCH (s:Shop{shop_id:1})-[r1:SELLS]->(p:Product)
WHERE (r1.from <= 1388880000000 AND r1.to > 1388880000000)
MATCH (p)-[r2:STATE]->(ps:ProductState)
WHERE (r2.from <= 1388880000000 AND r2.to > 1388880000000)
RETURN p.product_id AS productId,
ps.name AS product,
ps.price AS price
ORDER BY price DESC
119. Find
Structure
MATCH (s:Shop{shop_id:1})-[r1:SELLS]->(p:Product)
WHERE (r1.from <= 1388880000000 AND r1.to > 1388880000000)
MATCH (p)-[r2:STATE]->(ps:ProductState)
WHERE (r2.from <= 1388880000000 AND r2.to > 1388880000000)
RETURN p.product_id AS productId,
ps.name AS product,
ps.price AS price
ORDER BY price DESC
120. Find
State
MATCH (s:Shop{shop_id:1})-[r1:SELLS]->(p:Product)
WHERE (r1.from <= 1388880000000 AND r1.to > 1388880000000)
MATCH (p)-[r2:STATE]->(ps:ProductState)
WHERE (r2.from <= 1388880000000 AND r2.to > 1388880000000)
RETURN p.product_id AS productId,
ps.name AS product,
ps.price AS price
ORDER BY price DESC
121. Return
Results
MATCH (s:Shop{shop_id:1})-[r1:SELLS]->(p:Product)
WHERE (r1.from <= 1388880000000 AND r1.to > 1388880000000)
MATCH (p)-[r2:STATE]->(ps:ProductState)
WHERE (r2.from <= 1388880000000 AND r2.to > 1388880000000)
RETURN p.product_id AS productId,
ps.name AS product,
ps.price AS price
ORDER BY price DESC
123. Refactoring
DefiniAon
• Restructure
graph
without
changing
informaJonal
semanJcs
Reasons
• Improve
design
• Enhance
performance
• Accommodate
new
funcJonality
• Enable
iteraJve
and
incremental
development
of
data
model
124. Data
MigraJons
• Execute
in
repeatable
order
• Backup
database
• Execute
in
batches
– Unbounded
results
will
generate
large
transacJons
and
may
trigger
Out
of
Memory
excepJons
• Apply
migraJons
to
test
data
to
ensure
exisJng
funcJonality
doesn’t
break
• Ensure
applicaJon
can
accommodate
old
and
new
structures
if
performing
against
live
data
125. Extract
Node
from
Property
Problem
• You’ve
modeled
an
aXribute
as
a
property
with
a
simple
value,
but
now
need
to:
– Qualify
the
aXribute
semanJcs
AND/OR
– Introduce
a
complex
value
AND/OR
– Reify
the
relaJonship
represented
by
the
value
SoluAon
• Create
a
new
node
per
unique
property
value
• Connect
exisJng
nodes
to
the
new
property
nodes
• Remove
the
old
property
128. Your
Turn
• Clean
the
database
• Execute
setup.txt
• View
the
results
– MATCH
(n)
RETURN
n
• Execute
update-‐1.txt
repeatedly,
unJl
numberRemoved
is
zero
– At
each
stage,
view
the
results
129. Extract
Node
From
Property
MATCH (t:Trade) WHERE has(t.currency)
WITH t LIMIT {batchSize}
MERGE (c:Currency{code:t.currency})
MERGE (t)-[:CURRENCY]->(c)
REMOVE t.currency
RETURN count(t) AS numberRemoved
130. Select
Batch
of
Nodes
With
Property
MATCH (t:Trade) WHERE has(t.currency)
WITH t LIMIT {batchSize}
MERGE (c:Currency{code:t.currency})
MERGE (t)-[:CURRENCY]->(c)
REMOVE t.currency
RETURN count(t) AS numberRemoved
131. Create
Property
Node
MATCH (t:Trade) WHERE has(t.currency)
WITH t LIMIT {batchSize}
MERGE (c:Currency{code:t.currency})
MERGE (t)-[:CURRENCY]->(c)
REMOVE t.currency
RETURN count(t) AS numberRemoved
Copy
property
value
from
exisJng
node
132. Relate
ExisJng
Node
to
Property
Node
MATCH (t:Trade) WHERE has(t.currency)
WITH t LIMIT {batchSize}
MERGE (c:Currency{code:t.currency})
MERGE (t)-[:CURRENCY]->(c)
REMOVE t.currency
RETURN count(t) AS numberRemoved
133. Remove
Old
Property
MATCH (t:Trade) WHERE has(t.currency)
WITH t LIMIT {batchSize}
MERGE (c:Currency{code:t.currency})
MERGE (t)-[:CURRENCY]->(c)
REMOVE t.currency
RETURN count(t) AS numberRemoved
Repeat
unJl
numberRemoved
is
zero
134. Extract
Node
from
Array
Property
Problem
• You’ve
modeled
an
aXribute
as
a
property
with
an
array
value,
but
now
need
to:
– Qualify
the
aXribute
semanJcs
AND/OR
– Introduce
a
complex
value
AND/OR
– Reify
the
relaJonship
represented
by
the
value
SoluAon
• Create
a
new
node
per
unique
property
value
• Connect
exisJng
nodes
to
the
new
property
nodes
• Remove
the
old
property
137. Your
Turn
• Clean
the
database
• Execute
setup.txt
• View
the
results
– MATCH
(n)
RETURN
n
• Execute
update-‐1.txt
repeatedly,
unJl
numberRemoved
is
zero
– At
each
stage,
view
the
results
138. Extract
Node
From
Array
Property
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
139. Select
Batch
of
Nodes
With
Property
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
140. Loop
Through
Values
in
Array…
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
141. Create
New
Unique
Node
Per
Value
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
Copy
value
from
current
iteraJon
142. Relate
ExisJng
Node
to
Value
Node
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
143. Remove
Array
Property
MATCH (project:Project)
WHERE has(project.language)
WITH project LIMIT 2
FOREACH (l IN project.language |
MERGE (language:Language{value:l})
MERGE (project)-[:LANGUAGE]->(language))
REMOVE project.language
RETURN count(project) AS numberRemoved
Repeat
unJl
numberRemoved
is
zero
144. Extract
Node
From
RelaJonship
Problem
• You’ve
modeled
something
as
a
relaJonship
(with
properJes),
but
now
need
to
connect
it
to
more
than
two
things
SoluAon
• Extract
relaJonship
into
a
new
node
(and
two
new
relaJonships)
• Copy
old
relaJonship
properJes
onto
new
node
• Delete
old
relaJonship
147. Your
Turn
• Clean
the
database
• Execute
setup.txt
• View
the
results
– MATCH
(n)
RETURN
n
• Execute
update-‐1.txt
repeatedly,
unJl
numberDeleted
is
zero
– At
each
stage,
view
the
results
148. Extract
Node
From
RelaJonship
MATCH (a:User)-[r:EMAILED]->(b:User)
WITH a, r, b LIMIT 2
CREATE (email:Email{content:r.content})
MERGE (a)-[:SENT]->(email)-[:TO]->(b)
DELETE r
RETURN count(r) AS numberDeleted
149. Select
Batch
of
RelaJonships
MATCH (a:User)-[r:EMAILED]->(b:User)
WITH a, r, b LIMIT 2
CREATE (email:Email{content:r.content})
MERGE (a)-[:SENT]->(email)-[:TO]->(b)
DELETE r
RETURN count(r) AS numberDeleted
150. Create
New
Node
and
RelaJonships
MATCH (a:User)-[r:EMAILED]->(b:User)
WITH a, r, b LIMIT 2
CREATE (email:Email{content:r.content})
MERGE (a)-[:SENT]->(email)-[:TO]->(b)
DELETE r
RETURN count(r) AS numberDeleted
“Refactoring
ID”
ensures
uniqueness
Copy
properJes
from
old
relaJonship
151. Delete
Old
RelaJonship
MATCH (a:User)-[r:EMAILED]->(b:User)
WITH a, r, b LIMIT 2
CREATE (email:Email{content:r.content})
MERGE (a)-[:SENT]->(email)-[:TO]->(b)
DELETE r
RETURN count(r) AS numberDeleted
Repeat
unJl
numberDeleted
is
zero