The Technical Co-Founder Podcast with Fexingo: Engineering Founders, CTOs, and Building from Code artwork

The Technical Co-Founder Podcast with Fexingo: Engineering Founders, CTOs, and Building from Code · Fexingo

How Notion Engineered Its Own Database

Notion’s journey from a simple note-taking app to a unified workspace platform was driven by one critical engineering decision: building their own database engine instead of relying on existing SQL solutions. This episode explores the technical and business trade-offs of that choice, examining how it impacted scalability, flexibility, and developer velocity. We look at specific architectural patterns, the cost of self-hosting complex infrastructure, and why some founders decide to bake rather than buy when their product’s core value proposition is data organization. #NotionEngineering #DatabaseArchitecture #SelfHostedDatabases #SaaSInfrastructure #TechnicalFounders #ProductLedGrowth #DeveloperVelocity #SoftwareArchitecture #TechStrategy #BusinessTechnology #FexingoBusiness #BusinessPodcast #StartupLessons #EngineeringCulture #DataModeling #CloudComputing #ProductDevelopment #TechLeadership Keep every episode free: buymeacoffee.com/fexingo

Oct 252026
9 minlength
1transcript lines
Publishertranscript source

Transcript first 1 of 1 lines

Lucas: Let’s talk about the moment Notion stopped being just a note-taking app and started becoming an operating system for teams. It wasn’t a marketing pivot; it was a fundamental shift in how they handled data. Most SaaS companies bolt on databases like PostgreSQL or MongoDB because they’re reliable, well-documented, and easy to hire for. Notion did the opposite. Luna: Right, they built their own storage layer from scratch. Why? Because their product logic—blocks, relations, rollups—didn’t fit neatly into relational tables without massive abstraction overhead. Lucas: Exactly. If you try to force a block-based editor into a traditional SQL schema, you end up with hundreds of joins, messy normalization, and performance bottlenecks that slow down every query. Notion needed something that treated content as a graph, not a table. So they engineered a custom key-value store optimized for hierarchical data retrieval. Luna: That sounds incredibly risky for a startup trying to scale quickly. Did they regret the initial development time? Lucas: They didn’t have a choice if they wanted to deliver the UX they promised. The trade-off was upfront complexity for long-term agility. Once that database layer was stable, adding new features like databases, kanban boards, or calendars became trivial because the underlying data structure already supported it natively. Luna: So the technical debt was front-loaded. They paid it early so they wouldn’t pay it later with refactoring hell. Lucas: Precisely. And this brings us to a broader question for engineering founders: when should you build your own infrastructure versus buying it? For most companies, the answer is buy. But for companies where the database the product, building might be the only way to win. Luna: I’d argue that’s true for maybe five percent of startups. The rest get bogged down maintaining infrastructure they never intended to sell. Lucas: Agreed. But let’s look at the numbers. Notion spent roughly two years refining their database engine before they even launched public beta. That’s a huge opportunity cost. Yet, today, they serve millions of users with near-zero latency on complex queries. That’s not possible with off-the-shelf solutions handling their specific use case. Luna: But what about the operational burden? Running your own database means you’re responsible for backups, scaling, security patches, and disaster recovery. That’s a full-time team right there. Lucas: It is. And Notion has had to grow their infra team significantly to handle that. But here’s the kicker: because they control the stack, they can optimize for their exact workload. They don’t need to generalize for everyone else. That specialization is their moat. Luna: So the moat isn’t the feature set; it’s the efficiency of their data layer. Competitors can copy the UI, but copying the backend would take them years. Lucas: Spot on. And that’s why I think we’re seeing more companies reconsider the 'build vs. buy' debate. It’s not just about speed anymore; it’s about differentiation. If your data model is unique, your infrastructure should reflect that uniqueness. Luna: I’m curious though—did they ever consider hybrid approaches? Like using a standard database for user metadata and their custom one for content? Lucas: They did initially, but it created consistency issues. When you split your data across different systems, you introduce distributed transaction problems. Eventually, they realized that keeping everything in one place, even if it meant solving harder engineering problems, was cleaner for the end user. Luna: Cleaner for the user, messier for the engineer. Classic trade-off. Lucas: Exactly. And this leads me to another point: talent acquisition. Building a custom database requires senior engineers who understand distributed systems deeply. You can’t hire juniors for that. Notion had to attract top-tier talent specifically for this challenge. Luna: Which increases burn rate significantly. Are there smaller companies that can afford that luxury? Lucas: Maybe not at Notion’s scale, but the principle applies. If you’re a small fintech startup dealing with high-frequency trading data, you might also need a custom solution. The key is identifying where your data complexity creates competitive advantage. Luna: So it’s about aligning technical decisions with business strategy. Not just building because it’s cool. Lucas: Always. Otherwise, you’re just building tech for tech’s sake. Which brings us to a quick note on how we keep this show running. If these conversations are useful for what you're building or running, honestly, if today was worth a coffee to you, that's the link — buy me a coffee dot com slash fexingo — that's F. E. X. I. N. G. O. Luna: Yeah, it really helps cover the hosting costs and keeps the ads away. Thanks for supporting us. Lucas: Back to the topic. Let’s talk about the future of Notion’s database. They’re starting to integrate AI models directly into their data layer. Imagine querying your notes with natural language and having the AI understand the relationships between blocks. Luna: That’s powerful. Because their data is already structured in a way that LLMs can easily parse. Most other tools struggle with unstructured text or rigid schemas. Lucas: Right. So their custom database becomes a perfect playground for AI applications. They’re not just storing data; they’re making it intelligent. That’s a huge leap forward from where they were five years ago. Luna: It feels like they’re moving from a tool to a platform. Is that the next big step for them? Lucas: I think so. Platforms have higher margins and stickier customers. By enabling third-party integrations and API access, they’re expanding their ecosystem. But all of that relies on the robustness of their database engine. Luna: So the foundation holds the entire house together. If the database slips, everything falls apart. Lucas: Precisely. And that’s why investing in that core infrastructure was worth it. It’s not just about fixing bugs; it’s about enabling innovation. Every new feature builds on that solid base. Luna: It makes me wonder if other productivity apps will follow suit. Maybe Slack or Microsoft will rethink their data layers too. Lucas: Possible, but unlikely soon. The cost barrier is too high for now. Notion got there first and established a lead. Others might catch up, but they’ll always be playing defense against Notion’s momentum. Luna: Defensive positioning through technical superiority. That’s a smart strategy. Lucas: It is. And it highlights a shift in how we think about software development. It’s no longer just about shipping features fast; it’s about building the right foundation to support those features sustainably. Luna: So the lesson for founders is to identify your core complexity early and invest in it, rather than outsourcing it. Lucas: Exactly. Don’t treat your database as a commodity if it’s central to your value proposition. Build it, own it, and leverage it. Luna: Makes sense. Though I still think most people should probably just use PostgreSQL and move on. Lucas: For ninety-five percent of cases, yes. But for the five percent where it matters, it’s the difference between surviving and dominating. Luna: Fair enough. So what’s the takeaway for our listeners who aren’t building a billion-dollar workspace app? Lucas: Audit your own stack. Where is your data complexity highest? Is there a part of your product where generic solutions are holding you back? That’s where you should consider digging deeper. Luna: And if you find nothing, then maybe just stick to the basics. No need to over-engineer. Lucas: Right. Balance is key. But knowing when to break the rules is what separates good engineers from great ones. Luna: Great point. I think we’ve covered the depth of this topic well. Any final thoughts on Notion’s trajectory? Lucas: Just that their success is a testament to the power of vertical integration in software. They didn’t just build an app; they built the engine that powers it. Luna: And that engine is still accelerating. Hard to predict where they’ll go next, but the foundation is solid. Lucas: Indeed. As we wrap up, I’m left wondering: what other industries are ripe for this kind of foundational rethinking? Is healthcare data ready for a Notion-like overhaul? Luna: That’s a fascinating question. Probably not anytime soon due to regulations, but the potential is there. Lucas: Maybe. Or maybe the next wave of innovation is already happening in plain sight, waiting for someone to tackle the hard parts. Until then, keep building smart. Luna: Thanks for tuning in. See you next time.

More The Technical Co-Founder Podcast with Fexingo: Engineering Founders, CTOs, and Building from Code episodes →