SlideShare a Scribd company logo
1 of 9
Relational DB
vs
Document (no-SQL) DB
vs
Graph DB
Explanation through Examples
Relational DB
 This example has one to one
mapping.
 Foreign key reference.
 Normalized Structure, no
redundancy.
 Unique identifier necessary for
primary key as well as foreign key.
Article ID Article Name Article Content Article Date Author ID
ar1 Some Article Some Content 20-Feb-2010 au1
ar2 Other Article Other Content 10-Nov-2019 au2
ar3 Another Article Another Content 15-Sep-2011 au2
Author ID Author Name Author DOB
au1 Classy Betty 03-Jan-1970
au2 Casual Sam 04-Mar-1960
Document DB (no-SQL)
 The same example from previous
slide is designed with one level
nesting in this structure.
 Author structures nested in Article
structures.
 Redundancy in author information,
but that is normal in view of faster
access.
 Unlike relational DB, unique
identifier not needed.
 Usually represented as JSON
structure (illustrated to the right) or
key-value store (illustrated in a later
slide).
[
{
"Article Name": "Some Article",
"Article Content": "Some Content",
"Article Date": "20-Feb-2010",
"Author": {
"Author Name": "Classy Betty",
"Author DOB": "03-Jan-1970"
}
},
{
"Article Name": "Other Article",
"Article Content": "Other Content",
"Article Date": "10-Nov-2019",
"Author": {
"Author Name": "Casual Sam",
"Author DOB": "04-Mar-1960"
}
},
{
"Article Name": "Another Article",
"Article Content": "Another Content",
"Article Date": "15-Sep-2011",
"Author": {
"Author Name": "Casual Sam",
"Author DOB": "04-Mar-1960"
}
}
]
Graph DB
 This example has one to one
mapping, explained as relations.
 Normalized Structure, no
redundancy.
 Graph consists of nodes and
relationship.
 Both nodes and relationship can
have additional properties.
Type Command
Articles
(Node)
CREATE
(ar1:Article {name:'Some Article',content:"Some Content",date:"20-Feb-2010"})
CREATE
(ar2:Article {name:'Other Article',content:"Other Content",date:"10-Nov-2019"})
CREATE
(ar3:Article {name:'Another Article',content:"Another Content",date:"15-Sep-2011"})
Authors
(Node)
CREATE (au1:Author {name:'Classy Betty',dob:'03-Jan-1970'})
CREATE (au2:Author {name:'Casual Sam',dob:'04-Mar-1960'})
Authored By
(Relationship)
CREATE (ar1)-[:AUTHORED_BY]->(au1)
CREATE (ar2)-[:AUTHORED_BY]->(au2)
CREATE (ar3)-[:AUTHORED_BY]->(au2)
Relational DB
 This example has many to many
relationship.
 Foreign key reference in a separate
mapping table.
 Normalized Structure, no
redundancy.
 Unique identifier necessary for
primary key as well as foreign key.
Article ID Article Name Article Content Article Date
ar1 Some Article Some Content 20-Feb-2010
ar2 Other Article Other Content 10-Nov-2019
ar3 Another Article Another Content 15-Sep-2011
Author ID Author Name Author DOB
au1 Classy Betty 03-Jan-1970
au2 Casual Sam 04-Mar-1960
Author ID Article ID
au1 ar1
au2 ar1
au2 ar2
au1 ar3
au2 ar3
Document DB (no-SQL)
 The same example from previous
slide is designed with one level
nesting in this structure.
 The structure shows Author
structures nested in Article
structures.
 Redundancy in author information,
but that is normal in view of faster
access.
 The nested modelling is predefined
in view of the consumer application.
 Unlike relational DB, unique
identifier not needed.
Articles Collection (Authors nested within documents)
0 Article Name Some Article
Article Content Some Content
Article Date 20-Feb-2010
Authors 0 Author Name Classy Betty
Author DOB 03-Jan-1970
1 Author Name Casual Sam
Author DOB 04-Mar-1960
1 Article Name Other Article
Article Content Other Content
Article Date 10-Nov-2019
Authors 0 Author Name Casual Sam
Author DOB 04-Mar-1960
2 Article Name Another Article
Article Content Another Content
Article Date 15-Sep-2011
Authors 0 Author Name Classy Betty
Author DOB 03-Jan-1970
1 Author Name Casual Sam
Author DOB 04-Mar-1960
Document DB (no-SQL)
 The same example from previous
slide is designed with one level
nesting in this structure.
 The structure shows Article
structures nested in Author
structures.
 Redundancy in article information,
but that is normal in view of faster
access.
 The nested modelling is predefined
in view of the consumer application.
 Unlike relational DB, unique
identifier not needed.
Authors Collection (Articles nested within documents)
0 Author Name Classy Betty
Author DOB 03-Jan-1970
Articles 0 Article Name Some Article
Article Content Some Content
Article Date 20-Feb-2010
1 Article Name Another Article
Article Content Another Content
Article Date 15-Sep-2011
1 Author Name Casual Sam
Author DOB 04-Mar-1960
Articles 0 Article Name Some Article
Article Content Some Content
Article Date 20-Feb-2010
1 Article Name Other Article
Article Content Other Content
Article Date 10-Nov-2019
2 Article Name Another Article
Article Content Another Content
Article Date 15-Sep-2011
Document DB (no-SQL)
 The same example from previous
slide is designed in JSON structure
following the two modelling
approaches (partially displayed).
[
{
"Article Name": "Some Article",
"Article Content": "Some Content",
"Article Date": "20-Feb-2010",
"Authors": [
{
"Author Name": "Classy Betty",
"Author DOB": "03-Jan-1970"
},
{
"Author Name": "Casual Sam",
"Author DOB": "04-Mar-1960"
}
]
},
{
"Article Name": "Other Article",
"Article Content": "Other Content",
"Article Date": "10-Nov-2019",
"Authors": [
{
"Author Name": "Casual Sam",
"Author DOB": "04-Mar-1960"
}
]
},
…………………………….
]
[
{
"Author Name": "Classy Betty",
"Author DOB": "03-Jan-1970",
"Articles": [
{
"Article Name": "Some Article",
"Article Content": "Some Content",
"Article Date": "20-Feb-2010"
},
{
"Article Name": "Another Article",
"Article Content": "Another Content",
"Article Date": "15-Sep-2011"
}
]
},
{
"Author Name": "Casual Sam",
"Author DOB": "04-Mar-1960",
"Articles": [
{
"Article Name": "Some Article",
"Article Content": "Some Content",
"Article Date": "20-Feb-2010"
},
…………………………….
]
}
]
Graph DB
 This example has many to many
mapping, explained as relations.
 Normalized Structure, no
redundancy.
 Graph consists of nodes and
relationship.
 Both nodes and relationship can
have additional properties.
Type Command
Articles
(Node)
CREATE
(ar1:Article {name:'Some Article',content:"Some Content",date:"20-Feb-2010"})
CREATE
(ar2:Article {name:'Other Article',content:"Other Content",date:"10-Nov-2019"})
CREATE
(ar3:Article {name:'Another Article',content:"Another Content",date:"15-Sep-2011"})
Authors
(Node)
CREATE (au1:Author {name:'Classy Betty',dob:'03-Jan-1970'})
CREATE (au2:Author {name:'Casual Sam',dob:'04-Mar-1960'})
Authored By
(Relationship)
CREATE (ar1)-[:AUTHORED_BY]->(au1)
CREATE (ar1)-[:AUTHORED_BY]->(au2)
CREATE (ar2)-[:AUTHORED_BY]->(au2)
CREATE (ar3)-[:AUTHORED_BY]->(au1)
CREATE (ar3)-[:AUTHORED_BY]->(au2)

More Related Content

Recently uploaded

Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Comparing databases with examples

  • 1. Relational DB vs Document (no-SQL) DB vs Graph DB Explanation through Examples
  • 2. Relational DB  This example has one to one mapping.  Foreign key reference.  Normalized Structure, no redundancy.  Unique identifier necessary for primary key as well as foreign key. Article ID Article Name Article Content Article Date Author ID ar1 Some Article Some Content 20-Feb-2010 au1 ar2 Other Article Other Content 10-Nov-2019 au2 ar3 Another Article Another Content 15-Sep-2011 au2 Author ID Author Name Author DOB au1 Classy Betty 03-Jan-1970 au2 Casual Sam 04-Mar-1960
  • 3. Document DB (no-SQL)  The same example from previous slide is designed with one level nesting in this structure.  Author structures nested in Article structures.  Redundancy in author information, but that is normal in view of faster access.  Unlike relational DB, unique identifier not needed.  Usually represented as JSON structure (illustrated to the right) or key-value store (illustrated in a later slide). [ { "Article Name": "Some Article", "Article Content": "Some Content", "Article Date": "20-Feb-2010", "Author": { "Author Name": "Classy Betty", "Author DOB": "03-Jan-1970" } }, { "Article Name": "Other Article", "Article Content": "Other Content", "Article Date": "10-Nov-2019", "Author": { "Author Name": "Casual Sam", "Author DOB": "04-Mar-1960" } }, { "Article Name": "Another Article", "Article Content": "Another Content", "Article Date": "15-Sep-2011", "Author": { "Author Name": "Casual Sam", "Author DOB": "04-Mar-1960" } } ]
  • 4. Graph DB  This example has one to one mapping, explained as relations.  Normalized Structure, no redundancy.  Graph consists of nodes and relationship.  Both nodes and relationship can have additional properties. Type Command Articles (Node) CREATE (ar1:Article {name:'Some Article',content:"Some Content",date:"20-Feb-2010"}) CREATE (ar2:Article {name:'Other Article',content:"Other Content",date:"10-Nov-2019"}) CREATE (ar3:Article {name:'Another Article',content:"Another Content",date:"15-Sep-2011"}) Authors (Node) CREATE (au1:Author {name:'Classy Betty',dob:'03-Jan-1970'}) CREATE (au2:Author {name:'Casual Sam',dob:'04-Mar-1960'}) Authored By (Relationship) CREATE (ar1)-[:AUTHORED_BY]->(au1) CREATE (ar2)-[:AUTHORED_BY]->(au2) CREATE (ar3)-[:AUTHORED_BY]->(au2)
  • 5. Relational DB  This example has many to many relationship.  Foreign key reference in a separate mapping table.  Normalized Structure, no redundancy.  Unique identifier necessary for primary key as well as foreign key. Article ID Article Name Article Content Article Date ar1 Some Article Some Content 20-Feb-2010 ar2 Other Article Other Content 10-Nov-2019 ar3 Another Article Another Content 15-Sep-2011 Author ID Author Name Author DOB au1 Classy Betty 03-Jan-1970 au2 Casual Sam 04-Mar-1960 Author ID Article ID au1 ar1 au2 ar1 au2 ar2 au1 ar3 au2 ar3
  • 6. Document DB (no-SQL)  The same example from previous slide is designed with one level nesting in this structure.  The structure shows Author structures nested in Article structures.  Redundancy in author information, but that is normal in view of faster access.  The nested modelling is predefined in view of the consumer application.  Unlike relational DB, unique identifier not needed. Articles Collection (Authors nested within documents) 0 Article Name Some Article Article Content Some Content Article Date 20-Feb-2010 Authors 0 Author Name Classy Betty Author DOB 03-Jan-1970 1 Author Name Casual Sam Author DOB 04-Mar-1960 1 Article Name Other Article Article Content Other Content Article Date 10-Nov-2019 Authors 0 Author Name Casual Sam Author DOB 04-Mar-1960 2 Article Name Another Article Article Content Another Content Article Date 15-Sep-2011 Authors 0 Author Name Classy Betty Author DOB 03-Jan-1970 1 Author Name Casual Sam Author DOB 04-Mar-1960
  • 7. Document DB (no-SQL)  The same example from previous slide is designed with one level nesting in this structure.  The structure shows Article structures nested in Author structures.  Redundancy in article information, but that is normal in view of faster access.  The nested modelling is predefined in view of the consumer application.  Unlike relational DB, unique identifier not needed. Authors Collection (Articles nested within documents) 0 Author Name Classy Betty Author DOB 03-Jan-1970 Articles 0 Article Name Some Article Article Content Some Content Article Date 20-Feb-2010 1 Article Name Another Article Article Content Another Content Article Date 15-Sep-2011 1 Author Name Casual Sam Author DOB 04-Mar-1960 Articles 0 Article Name Some Article Article Content Some Content Article Date 20-Feb-2010 1 Article Name Other Article Article Content Other Content Article Date 10-Nov-2019 2 Article Name Another Article Article Content Another Content Article Date 15-Sep-2011
  • 8. Document DB (no-SQL)  The same example from previous slide is designed in JSON structure following the two modelling approaches (partially displayed). [ { "Article Name": "Some Article", "Article Content": "Some Content", "Article Date": "20-Feb-2010", "Authors": [ { "Author Name": "Classy Betty", "Author DOB": "03-Jan-1970" }, { "Author Name": "Casual Sam", "Author DOB": "04-Mar-1960" } ] }, { "Article Name": "Other Article", "Article Content": "Other Content", "Article Date": "10-Nov-2019", "Authors": [ { "Author Name": "Casual Sam", "Author DOB": "04-Mar-1960" } ] }, ……………………………. ] [ { "Author Name": "Classy Betty", "Author DOB": "03-Jan-1970", "Articles": [ { "Article Name": "Some Article", "Article Content": "Some Content", "Article Date": "20-Feb-2010" }, { "Article Name": "Another Article", "Article Content": "Another Content", "Article Date": "15-Sep-2011" } ] }, { "Author Name": "Casual Sam", "Author DOB": "04-Mar-1960", "Articles": [ { "Article Name": "Some Article", "Article Content": "Some Content", "Article Date": "20-Feb-2010" }, ……………………………. ] } ]
  • 9. Graph DB  This example has many to many mapping, explained as relations.  Normalized Structure, no redundancy.  Graph consists of nodes and relationship.  Both nodes and relationship can have additional properties. Type Command Articles (Node) CREATE (ar1:Article {name:'Some Article',content:"Some Content",date:"20-Feb-2010"}) CREATE (ar2:Article {name:'Other Article',content:"Other Content",date:"10-Nov-2019"}) CREATE (ar3:Article {name:'Another Article',content:"Another Content",date:"15-Sep-2011"}) Authors (Node) CREATE (au1:Author {name:'Classy Betty',dob:'03-Jan-1970'}) CREATE (au2:Author {name:'Casual Sam',dob:'04-Mar-1960'}) Authored By (Relationship) CREATE (ar1)-[:AUTHORED_BY]->(au1) CREATE (ar1)-[:AUTHORED_BY]->(au2) CREATE (ar2)-[:AUTHORED_BY]->(au2) CREATE (ar3)-[:AUTHORED_BY]->(au1) CREATE (ar3)-[:AUTHORED_BY]->(au2)