9bNine Bits

How Graph Databases Handle Deeply Nested Data

Deeply nested data, such as trees, bills of materials, or nested categories, is stored in a graph database as chains of connected nodes rather than as a single nested document. Each level of nesting becomes a relationship between two nodes, so depth is not fixed by a schema and is instead discovered at query time through traversal.
How Graph Databases Handle Deeply Nested Data

How to handle Deeply Nested Data in Graph

 

Details are as follows!

 

(1 hour session)
  • Topic: Deeply Nested Data in Graph
  • Date: October 1, 2019 (TUE)
  • Time:
    • PDT : 7:00AM – 8:00AM (UTC-07)
    • EDT : 10:00AM – 11:00AM (UTC-04)
    • UTC : 2:00PM – 3:00PM
    • BST : 3:00PM – 4:00PM (UTC+01)
    • CEST: 4:00PM – 5:00PM (UTC+02)
    • IST : 7:30PM – 8:30PM (UTC+05:30)
    • KST : 11:00PM – 12:00AM (UTC+09)
  • Language: English
  • Participation Link: REGISTER

 

Agenda:

  • Introduction
  • Deeply Nested Data in Graph
  • Q&A

 

 

What is the 6th Session about?

 

 

 

 

 

 

. Thank you!

 

Leave a Reply Cancel reply

Your email address will not be published.

Notify me of follow-up comments by email.

Notify me of new posts by email.

Common questions

Can PostgreSQL alone handle deeply nested data, or do I need a graph database?

PostgreSQL can handle nested hierarchies with recursive common table expressions or with JSONB for self-contained nested objects. A dedicated graph model, whether a native graph engine or a graph layer such as Apache AGE on top of PostgreSQL, becomes more useful once the hierarchy is deep, irregular, or needs to be traversed along more than one kind of relationship.

What is the difference between a tree and a general graph for nested data?

A tree is a graph where every node has exactly one parent and there are no cycles, which is the typical shape for category trees or org charts. A general graph allows multiple parents and cycles, which is common for things like bills of materials where a part can appear under more than one assembly.

How deep can a graph query traverse before performance becomes a problem?

There is no fixed limit; it depends on how many nodes and relationships the traversal actually visits, not on the raw size of the graph. An unbounded variable-length path on a hierarchy that is deeper or more densely connected than expected is the usual cause of slow queries, so bounding the depth or profiling the query plan is the standard way to check.

Is JSONB in PostgreSQL the same thing as a graph database for nested data?

No. JSONB stores one nested document as a single value and is efficient when that whole object is read or written together. A graph database stores each level as a separate connected node, which is better suited to traversing across many related items or following different relationship types through the same hierarchy.

Sources

  1. Apache AGE Documentation
  2. PostgreSQL Documentation: JSON Types
  3. openCypher Project

About this page

Last reviewed November 7, 2026 by the Nine Bits editors. Read our editorial policy or report an error.