RealtimeKeep your app up to date
AuthenticationOver 80+ OAuth integrations
Convex Components
ComponentsIndependent, modular, TypeScript building blocks for your backend.
Open sourceSelf host and develop locally
AI CodingGenerate high quality Convex code with AI
Compare
Convex vs. Firebase
Convex vs. Supabase
Convex vs. SQL
DocumentationGet started with your favorite frameworks
SearchSearch across Docs, Stack, and Discord
TemplatesUse a recipe to get started quickly
Convex for StartupsStart and scale your company with Convex
Convex ChampionsAmbassadors that support our thriving community
Convex CommunityShare ideas and ask for help in our community Discord
Stack
Stack

Stack is the Convex developer portal and blog, sharing bright ideas and techniques for building with Convex.

Explore Stack
BlogDocsPricing
GitHub
Log inStart building
Back

Relational Data

Represent & navigate relationships between db tables

The vast majority of apps need some kind of relational data model, connecting the dots between different entities represented as documents in a different db tables. In Convex, relational data can easily be modeled by means of document IDs, which enable references between documents stored anywhere in Convex, regardless of whether those relationships are 1:1, 1:many, or many:many. When it comes time to traverse those relationships while querying data, in Convex you just write code, instead of JOIN statements. Open-source helper functions written by the Convex team make it even easier to quickly define & navigate relational data with Convex.

Resources

💡BLOG
Walkthrough: Modeling data relationships in Convex schemas
stack.convex.dev/relationship-structures-let-s-talk-about-schemas
💡BLOG
Walkthrough: Helper functions for traversing data relationships
stack.convex.dev/functional-relationships-helpers
🚀DEMO
Sample code demonstrating relational data in Convex
github.com/get-convex/convex-demos/tree/main/relational-data-modeling
💻CODE
Import relationship helper functions from 'convex-helpers'
www.npmjs.com/package/convex-helpers#relationship-helpers
💡BLOG
Read up on how & why Convex differs from traditional relational DBs
stack.convex.dev/convex-vs-relational-databases
📄DOCS
Learn how to use document IDs to link data across Convex tables
docs.convex.dev/database/document-ids#references-and-relationships
🎞️VIDEO
Watch a short about why & how to model data relationships
www.youtube.com/shorts/ALW6_y79HU0
Get your app up and running in minutes
Start building
Convex logo
ProductSyncRealtimeAuthOpen sourceAI codingChefFAQPricing
DevelopersDocsBlogComponentsTemplatesStartupsChampionsChangelogPodcastLLMs.txt
CompanyAbout usBrandInvestorsBecome a partnerJobsNewsEventsTerms of servicePrivacy policySecurity
SocialTwitterDiscordYouTubeLumaBlueskyGitHub
A Trusted Solution
  • SOC 2 Type II Compliant
  • HIPAA Compliant
  • GDPR Verified
©2025 Convex, Inc.