David AlonsoD
Convex Community2y ago
4 replies
David Alonso

Support for a Notion-like Schema

Hey! We're looking to implement a modular data schema inspired by Notion - see this great article on what that looks like: https://www.notion.so/blog/data-model-behind-notion

As you can see, Notion stores the children of a block (e.g. a page) as a list of ids to other blocks in a field called content. It does so vs just back references (e.g. with a parentId) as suggested here: https://stack.convex.dev/relationship-structures-let-s-talk-about-schemas#back-references-scalable because the order of the ids in the content field actually determines the layout of those children. Given that Convex doesn't recommend having long arrays inside fields, I was wondering what the recommended approach here would be...
Notion
Notion’s data model enables the product’s most foundational component: blocks. Through blocks, we allow users more flexibility over their information.
Exploring Notion's Data Model: A Block-Based Architecture | Notion
In this post we’ll look at some patterns for structuring relationships in the Convex database.
Relationship Structures: Let's Talk About Schemas
Was this page helpful?