Road to NODES 2023: Graphing Relational Databases

Neo4j
Neo4jOpen Source NOSQL Graph Database em Neo4j
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
1
Graphing Relational Databases
Ghlen Nagels (https://nagels.tech, @GhlenNagels)
Freelance Consultant @ Neo4j, aRes Travel Inc, NTC & more
© 2023 Neo4j, Inc. All rights reserved.
Plan
Introduction
When To Migrate
Example Project
In-Depth Cases
2
© 2023 Neo4j, Inc. All rights reserved.
3
Introduction
3
© 2023 Neo4j, Inc. All rights reserved.
Introduction: Experience
Telecommunications
Life sciences
- Provided Multiple Migration Services
- PHP Driver Author & Maintainer
- Authored much material on this
- Mapped ORM/Query Builder from
Relational to Graph
- Provided Multiple Tutorials / Workshops
4
© 2023 Neo4j, Inc. All rights reserved.
Introduction: Requirement Essentials
Telecommunications
Life sciences
- Understanding of basic SQL principles
- Understanding of basic Cypher/CQL query language
5
© 2023 Neo4j, Inc. All rights reserved.
Introduction: How to get the most out of this
Telecommunications
Life sciences
- Experience with migrating schemas, data and systems
- Have Docker installed
- Understand cursors and the impact on memory
- Have experience in PHP
6
© 2023 Neo4j, Inc. All rights reserved.
Introduction: Frustration
Telecommunications
Life sciences
7
© 2023 Neo4j, Inc. All rights reserved.
8
The promised Land
[LMW][AN]M[PJT]+ → [LMW][AN][MG][PJT]+
8
https://www.youtube.com/watch?v=dFgkXxoSwWo
© 2023 Neo4j, Inc. All rights reserved.
9
9
Ecosystem
© 2023 Neo4j, Inc. All rights reserved.
Path To The Promised Land: Option 1
Telecommunications
Life sciences
10
© 2023 Neo4j, Inc. All rights reserved.
Path To The Promised Land: Option 2
Telecommunications
Life sciences
11
© 2023 Neo4j, Inc. All rights reserved.
Path to the promised land:
Telecommunications
Life sciences
12
The ecosystem does not necessarily
help you get there
Proper planning and understanding
your data model does
© 2023 Neo4j, Inc. All rights reserved.
Introduction: Mindset
Telecommunications
Life sciences
13
- Confidence:
Relational Database Models can be Directly translated to Graphs
- Understanding:
The real challenge is understanding you own Data Model
- Patterns:
Every DB pattern has a solution on how to translate it to Graphs
(we’ll see 4 patterns today)
© 2023 Neo4j, Inc. All rights reserved.
14
When to Migrate
14
© 2023 Neo4j, Inc. All rights reserved.
When to Migrate
Telecommunications
Life sciences
15
- Holistic Problem
- Always complicated
- Risk versus Reward
A collection of indicators help decide
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Slow join operations
Telecommunications
Life sciences
16
- Relationships are not a first class-citizen
in Relational Databases
- Recursive joins and big datasets put a chokehold
on Your Applications
- Almost all other Indicators are actually
Sub-optimal solutions to this
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Caches for everything
Telecommunications
Life sciences
17
- A cache is a great tool to optimise performance
- Premature optimisation is the root of all evil
- Caching introduces data duplication
- Cache flushing is a horrible problem to have
especially in complex server topologies
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Esoteric Solutions (for simple problems)
Telecommunications
Life sciences
18
- Ever come up with your own indexing system?
- Polymorphism (see later)
- Materialised views
- Database triggers
- Dynamic queries without parameters
- Verrrryyy lazy loading
- …
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Non Normalised Tables
Telecommunications
Life sciences
19
- They actually taught me this in college
- Willfully introduces data duplicity to improve performance
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Lots of DB Migrations
Telecommunications
Life sciences
20
- Constantly changing data models
- Are being hampered by a system with forced schemas
- Changing, moving and splitting tables are expensive
- Complicates CI
© 2023 Neo4j, Inc. All rights reserved.
Migration Indicator: Painful Data Science Stack
Telecommunications
Life sciences
21
© 2023 Neo4j, Inc. All rights reserved.
22
Example Project
22
© 2023 Neo4j, Inc. All rights reserved.
Example Project: The Schema
Telecommunications
Life sciences
23
© 2023 Neo4j, Inc. All rights reserved.
Example Project: Key Takeaways
Telecommunications
Life sciences
24
- Simple Join: Comments have one user
- Self Join: Articles and Comments are hierarchical
- Pivot Table: An Article may contain multiple Tags
A Tag can tag multiple Articles
- Polymorphism: Categories are all-encompassing
© 2023 Neo4j, Inc. All rights reserved.
Example Project: Goals
Telecommunications
Life sciences
25
- Query Simplications
- Speed upgrades
- Easy Migration
© 2023 Neo4j, Inc. All rights reserved.
Neo4j Workshop
⚡ Let’s get down to business 💻
26
https://github.com/transistive/book-example
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Simple Join
Telecommunications
Life sciences
27
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Self Join
Telecommunications
Life sciences
28
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Pivot Table
Telecommunications
Life sciences
29
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Polymorphism
Telecommunications
Life sciences
30
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Polymorphism
Telecommunications
Life sciences
31
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Key Insight
32
All four cases map to the same data solution
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Another Unfair Example
Telecommunications
Life sciences
33
How to query the hierarchical structure of articles?
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Another Unfair Example
Telecommunications
Life sciences
34
© 2023 Neo4j, Inc. All rights reserved.
Query Simplifications: Another Unfair Example
Telecommunications
Life sciences
35
© 2023 Neo4j, Inc. All rights reserved.
36
In-Depth Cases
36
© 2023 Neo4j, Inc. All rights reserved.
Overall Strategy
Telecommunications
Life sciences
37
- Identify what is a Node and a Relationship
- Insert the Nodes with the original identification
in the origin database
- Connect the Relationships using the original identification in
the original database. AKA the FINAL JOIN
- Optional: Wipe original database identification
© 2023 Neo4j, Inc. All rights reserved.
In-Depth Cases: Nodes
Telecommunications
Life sciences
38
© 2023 Neo4j, Inc. All rights reserved.
In-Depth Cases: Simple joins & self joins
Telecommunications
Life sciences
39
- The connection information is in both pair of nodes
- MERGE is your friend
- Introduce a cartesian product with a where
expression limiting the matches
- Potentially optimise performance with Indexes
(Congratulations, you just reinvented foreign keys in a graph database)
- Use Limit + Result Summary to chunk the query if required
© 2023 Neo4j, Inc. All rights reserved.
In-Depth Cases: Relationships
Telecommunications
Life sciences
40
© 2023 Neo4j, Inc. All rights reserved.
In-Depth Cases: Pivot tables
Telecommunications
Life sciences
41
- The pivot table is the relationship
- Use the identifying information to match a cartesian product,
limited through a Where Expression
- All other rules apply
- Remove the Pivot Table Nodes
© 2023 Neo4j, Inc. All rights reserved.
In-Depth Cases: Polymorphism
Telecommunications
Life sciences
42
- Treat the polymorphic table as a pivot table
- Use application level logic to translate the table names to
node labels
© 2023 Neo4j, Inc. All rights reserved.
Neo4j Workshop
⚡ Let’s get down to business 💻
43
back to the same code
© 2023 Neo4j, Inc. All rights reserved.
Let’s stay connected
with the community
dev.neo4j.com/chat
© 2023 Neo4j, Inc. All rights reserved.
Let’s stay connected
ghlen@nagels.tech
Whatsapp
+32 485 49 64 90
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
Thank You!
Special thanks to: Martin O’Hanlon and
Jennifer Reif
Questions?
1 de 46

Recomendados

Knowledge Graphs for Network Digital Twins por
Knowledge Graphs for Network Digital TwinsKnowledge Graphs for Network Digital Twins
Knowledge Graphs for Network Digital TwinsNeo4j
143 visualizações20 slides
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph Database por
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph DatabaseTelecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph DatabaseNeo4j
121 visualizações21 slides
Spark and Deep Learning Frameworks at Scale 7.19.18 por
Spark and Deep Learning Frameworks at Scale 7.19.18Spark and Deep Learning Frameworks at Scale 7.19.18
Spark and Deep Learning Frameworks at Scale 7.19.18Cloudera, Inc.
820 visualizações51 slides
Transforming BT’s Infrastructure Management with Graph Technology por
Transforming BT’s Infrastructure Management with Graph TechnologyTransforming BT’s Infrastructure Management with Graph Technology
Transforming BT’s Infrastructure Management with Graph TechnologyNeo4j
323 visualizações23 slides
Neo4j: The path to success with Graph Database and Graph Data Science por
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j: The path to success with Graph Database and Graph Data Science
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j
83 visualizações44 slides
Optimizing Your Supply Chain with Neo4j por
Optimizing Your Supply Chain with Neo4jOptimizing Your Supply Chain with Neo4j
Optimizing Your Supply Chain with Neo4jNeo4j
30 visualizações39 slides

Mais conteúdo relacionado

Similar a Road to NODES 2023: Graphing Relational Databases

El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato... por
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...Neo4j
62 visualizações49 slides
Mass Scale Networking por
Mass Scale NetworkingMass Scale Networking
Mass Scale NetworkingSteve Iatrou
11 visualizações37 slides
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx por
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptxThe art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptxNeo4j
188 visualizações29 slides
The Neo4j Data Platform for Today & Tomorrow.pdf por
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfNeo4j
157 visualizações53 slides
Data Lineage, Property Based Testing & Neo4j por
Data Lineage, Property Based Testing & Neo4j Data Lineage, Property Based Testing & Neo4j
Data Lineage, Property Based Testing & Neo4j Neo4j
85 visualizações13 slides
Workshop - Build a Graph Solution por
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph SolutionNeo4j
94 visualizações61 slides

Similar a Road to NODES 2023: Graphing Relational Databases(20)

El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato... por Neo4j
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
Neo4j62 visualizações
Mass Scale Networking por Steve Iatrou
Mass Scale NetworkingMass Scale Networking
Mass Scale Networking
Steve Iatrou11 visualizações
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx por Neo4j
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptxThe art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
Neo4j188 visualizações
The Neo4j Data Platform for Today & Tomorrow.pdf por Neo4j
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j157 visualizações
Data Lineage, Property Based Testing & Neo4j por Neo4j
Data Lineage, Property Based Testing & Neo4j Data Lineage, Property Based Testing & Neo4j
Data Lineage, Property Based Testing & Neo4j
Neo4j85 visualizações
Workshop - Build a Graph Solution por Neo4j
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph Solution
Neo4j94 visualizações
IRJET- Top-K Query Processing using Top Order Preserving Encryption (TOPE) por IRJET Journal
IRJET- Top-K Query Processing using Top Order Preserving Encryption (TOPE)IRJET- Top-K Query Processing using Top Order Preserving Encryption (TOPE)
IRJET- Top-K Query Processing using Top Order Preserving Encryption (TOPE)
IRJET Journal19 visualizações
Dagster - DataOps and MLOps for Machine Learning Engineers.pdf por Hong Ong
Dagster - DataOps and MLOps for Machine Learning Engineers.pdfDagster - DataOps and MLOps for Machine Learning Engineers.pdf
Dagster - DataOps and MLOps for Machine Learning Engineers.pdf
Hong Ong88 visualizações
The path to success with graph database and graph data science_ Neo4j GraphSu... por Neo4j
The path to success with graph database and graph data science_ Neo4j GraphSu...The path to success with graph database and graph data science_ Neo4j GraphSu...
The path to success with graph database and graph data science_ Neo4j GraphSu...
Neo4j91 visualizações
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx por Neo4j
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptxNeo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j127 visualizações
PyMADlib - A Python wrapper for MADlib : in-database, parallel, machine learn... por Srivatsan Ramanujam
PyMADlib - A Python wrapper for MADlib : in-database, parallel, machine learn...PyMADlib - A Python wrapper for MADlib : in-database, parallel, machine learn...
PyMADlib - A Python wrapper for MADlib : in-database, parallel, machine learn...
Srivatsan Ramanujam2.9K visualizações
IRJET- Efficient Geometric Range Search on RTREE Occupying Encrypted Spatial ... por IRJET Journal
IRJET- Efficient Geometric Range Search on RTREE Occupying Encrypted Spatial ...IRJET- Efficient Geometric Range Search on RTREE Occupying Encrypted Spatial ...
IRJET- Efficient Geometric Range Search on RTREE Occupying Encrypted Spatial ...
IRJET Journal15 visualizações
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da... por Neo4j
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j39 visualizações
Show and Tell - Data and Digitalisation, Digital Twins.pdf por SIFOfgem
Show and Tell - Data and Digitalisation, Digital Twins.pdfShow and Tell - Data and Digitalisation, Digital Twins.pdf
Show and Tell - Data and Digitalisation, Digital Twins.pdf
SIFOfgem204 visualizações
Project por Sazzadul Haque
ProjectProject
Project
Sazzadul Haque88 visualizações
The Art of the Possible with Graph Technology por Neo4j
The Art of the Possible with Graph TechnologyThe Art of the Possible with Graph Technology
The Art of the Possible with Graph Technology
Neo4j15 visualizações
Capella Days 2021 | An example of model-centric engineering environment with ... por Obeo
Capella Days 2021 | An example of model-centric engineering environment with ...Capella Days 2021 | An example of model-centric engineering environment with ...
Capella Days 2021 | An example of model-centric engineering environment with ...
Obeo251 visualizações
Borapureddi Ashok_present por BORAPUREDDI ASHOK
Borapureddi Ashok_presentBorapureddi Ashok_present
Borapureddi Ashok_present
BORAPUREDDI ASHOK175 visualizações
IT6511 Networks Laboratory por gayathridevprasad
IT6511 Networks LaboratoryIT6511 Networks Laboratory
IT6511 Networks Laboratory
gayathridevprasad46 visualizações
CV of Minfeng Hu por Minfeng Hu
CV of Minfeng HuCV of Minfeng Hu
CV of Minfeng Hu
Minfeng Hu146 visualizações

Mais de Neo4j

FIMA 2023 Neo4j & FS - Entity Resolution.pptx por
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptxNeo4j
17 visualizações26 slides
Operations & Data Graph por
Operations & Data GraphOperations & Data Graph
Operations & Data GraphNeo4j
43 visualizações25 slides
TAGTTOO: La nova xarxa social por
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa socialNeo4j
27 visualizações19 slides
El Arte de lo Possible por
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo PossibleNeo4j
50 visualizações35 slides
Neo4j y GenAI por
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI Neo4j
54 visualizações41 slides
Roadmap y Novedades de producto por
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
60 visualizações33 slides

Mais de Neo4j(20)

FIMA 2023 Neo4j & FS - Entity Resolution.pptx por Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j17 visualizações
Operations & Data Graph por Neo4j
Operations & Data GraphOperations & Data Graph
Operations & Data Graph
Neo4j43 visualizações
TAGTTOO: La nova xarxa social por Neo4j
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa social
Neo4j27 visualizações
El Arte de lo Possible por Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j50 visualizações
Neo4j y GenAI por Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j54 visualizações
Roadmap y Novedades de producto por Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j60 visualizações
Neo4j : Graphes de Connaissance, IA et LLMs por Neo4j
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMs
Neo4j56 visualizações
Les nouveautés produit Neo4j por Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j32 visualizações
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu... por Neo4j
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...
Neo4j27 visualizações
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com... por Neo4j
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...
Neo4j54 visualizações
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf por Neo4j
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdfNeo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j59 visualizações
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx por Neo4j
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j55 visualizações
Neo4j workshop at GraphSummit London 14 Nov 2023.pdf por Neo4j
Neo4j workshop at GraphSummit London 14 Nov 2023.pdfNeo4j workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j54 visualizações
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx por Neo4j
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptxNeo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx
Neo4j66 visualizações
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx por Neo4j
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptxAstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
Neo4j47 visualizações
Google Cloud at GraphSummit London 14 Nov 2023.pptx por Neo4j
Google Cloud at GraphSummit London 14 Nov 2023.pptxGoogle Cloud at GraphSummit London 14 Nov 2023.pptx
Google Cloud at GraphSummit London 14 Nov 2023.pptx
Neo4j27 visualizações
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov... por Neo4j
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
Neo4j77 visualizações
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx por Neo4j
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptxNorthern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx
Neo4j47 visualizações
Peek into Neo4j Product Strategy and Roadmap por Neo4j
Peek into Neo4j Product Strategy and RoadmapPeek into Neo4j Product Strategy and Roadmap
Peek into Neo4j Product Strategy and Roadmap
Neo4j87 visualizações
Transforming Intelligence Analysis with Knowledge Graphs por Neo4j
Transforming Intelligence Analysis with Knowledge GraphsTransforming Intelligence Analysis with Knowledge Graphs
Transforming Intelligence Analysis with Knowledge Graphs
Neo4j62 visualizações

Último

Agile 101 por
Agile 101Agile 101
Agile 101John Valentino
9 visualizações20 slides
Generic or specific? Making sensible software design decisions por
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
6 visualizações60 slides
The Era of Large Language Models.pptx por
The Era of Large Language Models.pptxThe Era of Large Language Models.pptx
The Era of Large Language Models.pptxAbdulVahedShaik
7 visualizações9 slides
Myths and Facts About Hospice Care: Busting Common Misconceptions por
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common MisconceptionsCare Coordinations
7 visualizações1 slide
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... por
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...sparkfabrik
8 visualizações46 slides
Programming Field por
Programming FieldProgramming Field
Programming Fieldthehardtechnology
6 visualizações9 slides

Último(20)

Agile 101 por John Valentino
Agile 101Agile 101
Agile 101
John Valentino9 visualizações
Generic or specific? Making sensible software design decisions por Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Bert Jan Schrijver6 visualizações
The Era of Large Language Models.pptx por AbdulVahedShaik
The Era of Large Language Models.pptxThe Era of Large Language Models.pptx
The Era of Large Language Models.pptx
AbdulVahedShaik7 visualizações
Myths and Facts About Hospice Care: Busting Common Misconceptions por Care Coordinations
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common Misconceptions
Care Coordinations7 visualizações
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... por sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik8 visualizações
Sprint 226 por ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ10 visualizações
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action por Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok15 visualizações
ShortStory_qlora.pptx por pranathikrishna22
ShortStory_qlora.pptxShortStory_qlora.pptx
ShortStory_qlora.pptx
pranathikrishna225 visualizações
FOSSLight Community Day 2023-11-30 por Shane Coughlan
FOSSLight Community Day 2023-11-30FOSSLight Community Day 2023-11-30
FOSSLight Community Day 2023-11-30
Shane Coughlan6 visualizações
predicting-m3-devopsconMunich-2023-v2.pptx por Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app9 visualizações
Dapr Unleashed: Accelerating Microservice Development por Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski12 visualizações
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... por Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller42 visualizações
predicting-m3-devopsconMunich-2023.pptx por Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app7 visualizações
Navigating container technology for enhanced security by Niklas Saari por Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy14 visualizações
How Workforce Management Software Empowers SMEs | TraQSuite por TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuiteHow Workforce Management Software Empowers SMEs | TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuite
TraQSuite5 visualizações
AI and Ml presentation .pptx por FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8713 visualizações
SAP FOR TYRE INDUSTRY.pdf por Virendra Rai, PMP
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdf
Virendra Rai, PMP28 visualizações
Software evolution understanding: Automatic extraction of software identifier... por Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
Ra'Fat Al-Msie'deen10 visualizações
Fleet Management Software in India por Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable12 visualizações

Road to NODES 2023: Graphing Relational Databases

  • 1. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. 1 Graphing Relational Databases Ghlen Nagels (https://nagels.tech, @GhlenNagels) Freelance Consultant @ Neo4j, aRes Travel Inc, NTC & more
  • 2. © 2023 Neo4j, Inc. All rights reserved. Plan Introduction When To Migrate Example Project In-Depth Cases 2
  • 3. © 2023 Neo4j, Inc. All rights reserved. 3 Introduction 3
  • 4. © 2023 Neo4j, Inc. All rights reserved. Introduction: Experience Telecommunications Life sciences - Provided Multiple Migration Services - PHP Driver Author & Maintainer - Authored much material on this - Mapped ORM/Query Builder from Relational to Graph - Provided Multiple Tutorials / Workshops 4
  • 5. © 2023 Neo4j, Inc. All rights reserved. Introduction: Requirement Essentials Telecommunications Life sciences - Understanding of basic SQL principles - Understanding of basic Cypher/CQL query language 5
  • 6. © 2023 Neo4j, Inc. All rights reserved. Introduction: How to get the most out of this Telecommunications Life sciences - Experience with migrating schemas, data and systems - Have Docker installed - Understand cursors and the impact on memory - Have experience in PHP 6
  • 7. © 2023 Neo4j, Inc. All rights reserved. Introduction: Frustration Telecommunications Life sciences 7
  • 8. © 2023 Neo4j, Inc. All rights reserved. 8 The promised Land [LMW][AN]M[PJT]+ → [LMW][AN][MG][PJT]+ 8 https://www.youtube.com/watch?v=dFgkXxoSwWo
  • 9. © 2023 Neo4j, Inc. All rights reserved. 9 9 Ecosystem
  • 10. © 2023 Neo4j, Inc. All rights reserved. Path To The Promised Land: Option 1 Telecommunications Life sciences 10
  • 11. © 2023 Neo4j, Inc. All rights reserved. Path To The Promised Land: Option 2 Telecommunications Life sciences 11
  • 12. © 2023 Neo4j, Inc. All rights reserved. Path to the promised land: Telecommunications Life sciences 12 The ecosystem does not necessarily help you get there Proper planning and understanding your data model does
  • 13. © 2023 Neo4j, Inc. All rights reserved. Introduction: Mindset Telecommunications Life sciences 13 - Confidence: Relational Database Models can be Directly translated to Graphs - Understanding: The real challenge is understanding you own Data Model - Patterns: Every DB pattern has a solution on how to translate it to Graphs (we’ll see 4 patterns today)
  • 14. © 2023 Neo4j, Inc. All rights reserved. 14 When to Migrate 14
  • 15. © 2023 Neo4j, Inc. All rights reserved. When to Migrate Telecommunications Life sciences 15 - Holistic Problem - Always complicated - Risk versus Reward A collection of indicators help decide
  • 16. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Slow join operations Telecommunications Life sciences 16 - Relationships are not a first class-citizen in Relational Databases - Recursive joins and big datasets put a chokehold on Your Applications - Almost all other Indicators are actually Sub-optimal solutions to this
  • 17. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Caches for everything Telecommunications Life sciences 17 - A cache is a great tool to optimise performance - Premature optimisation is the root of all evil - Caching introduces data duplication - Cache flushing is a horrible problem to have especially in complex server topologies
  • 18. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Esoteric Solutions (for simple problems) Telecommunications Life sciences 18 - Ever come up with your own indexing system? - Polymorphism (see later) - Materialised views - Database triggers - Dynamic queries without parameters - Verrrryyy lazy loading - …
  • 19. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Non Normalised Tables Telecommunications Life sciences 19 - They actually taught me this in college - Willfully introduces data duplicity to improve performance
  • 20. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Lots of DB Migrations Telecommunications Life sciences 20 - Constantly changing data models - Are being hampered by a system with forced schemas - Changing, moving and splitting tables are expensive - Complicates CI
  • 21. © 2023 Neo4j, Inc. All rights reserved. Migration Indicator: Painful Data Science Stack Telecommunications Life sciences 21
  • 22. © 2023 Neo4j, Inc. All rights reserved. 22 Example Project 22
  • 23. © 2023 Neo4j, Inc. All rights reserved. Example Project: The Schema Telecommunications Life sciences 23
  • 24. © 2023 Neo4j, Inc. All rights reserved. Example Project: Key Takeaways Telecommunications Life sciences 24 - Simple Join: Comments have one user - Self Join: Articles and Comments are hierarchical - Pivot Table: An Article may contain multiple Tags A Tag can tag multiple Articles - Polymorphism: Categories are all-encompassing
  • 25. © 2023 Neo4j, Inc. All rights reserved. Example Project: Goals Telecommunications Life sciences 25 - Query Simplications - Speed upgrades - Easy Migration
  • 26. © 2023 Neo4j, Inc. All rights reserved. Neo4j Workshop ⚡ Let’s get down to business 💻 26 https://github.com/transistive/book-example
  • 27. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Simple Join Telecommunications Life sciences 27
  • 28. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Self Join Telecommunications Life sciences 28
  • 29. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Pivot Table Telecommunications Life sciences 29
  • 30. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Polymorphism Telecommunications Life sciences 30
  • 31. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Polymorphism Telecommunications Life sciences 31
  • 32. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Key Insight 32 All four cases map to the same data solution
  • 33. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Another Unfair Example Telecommunications Life sciences 33 How to query the hierarchical structure of articles?
  • 34. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Another Unfair Example Telecommunications Life sciences 34
  • 35. © 2023 Neo4j, Inc. All rights reserved. Query Simplifications: Another Unfair Example Telecommunications Life sciences 35
  • 36. © 2023 Neo4j, Inc. All rights reserved. 36 In-Depth Cases 36
  • 37. © 2023 Neo4j, Inc. All rights reserved. Overall Strategy Telecommunications Life sciences 37 - Identify what is a Node and a Relationship - Insert the Nodes with the original identification in the origin database - Connect the Relationships using the original identification in the original database. AKA the FINAL JOIN - Optional: Wipe original database identification
  • 38. © 2023 Neo4j, Inc. All rights reserved. In-Depth Cases: Nodes Telecommunications Life sciences 38
  • 39. © 2023 Neo4j, Inc. All rights reserved. In-Depth Cases: Simple joins & self joins Telecommunications Life sciences 39 - The connection information is in both pair of nodes - MERGE is your friend - Introduce a cartesian product with a where expression limiting the matches - Potentially optimise performance with Indexes (Congratulations, you just reinvented foreign keys in a graph database) - Use Limit + Result Summary to chunk the query if required
  • 40. © 2023 Neo4j, Inc. All rights reserved. In-Depth Cases: Relationships Telecommunications Life sciences 40
  • 41. © 2023 Neo4j, Inc. All rights reserved. In-Depth Cases: Pivot tables Telecommunications Life sciences 41 - The pivot table is the relationship - Use the identifying information to match a cartesian product, limited through a Where Expression - All other rules apply - Remove the Pivot Table Nodes
  • 42. © 2023 Neo4j, Inc. All rights reserved. In-Depth Cases: Polymorphism Telecommunications Life sciences 42 - Treat the polymorphic table as a pivot table - Use application level logic to translate the table names to node labels
  • 43. © 2023 Neo4j, Inc. All rights reserved. Neo4j Workshop ⚡ Let’s get down to business 💻 43 back to the same code
  • 44. © 2023 Neo4j, Inc. All rights reserved. Let’s stay connected with the community dev.neo4j.com/chat
  • 45. © 2023 Neo4j, Inc. All rights reserved. Let’s stay connected ghlen@nagels.tech Whatsapp +32 485 49 64 90
  • 46. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. Thank You! Special thanks to: Martin O’Hanlon and Jennifer Reif Questions?