<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fi73pttiz" -->

---
title: Database Design Doesn&#x27;t Start With Table. It Starts With...
description: Good database design starts with understanding business domain consequences, not jumping straight to CREATE TABLE. Key principles covered: treat schema changes...
canonical: https://daily.dev/posts/fi73pttiz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Database Design Doesn&#x27;t Start With Table. It Starts With Consequences | daily.dev
og:description: Good database design starts with understanding business domain consequences, not jumping straight to CREATE TABLE. Key principles covered: treat schema changes...
og:url: https://daily.dev/posts/fi73pttiz
og:image: https://api.daily.dev/og/posts/fI73pTtiz.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Database Design Doesn't Start With Table. It Starts With Consequences

**[Engineering Leadership](https://daily.dev/sources/engineeringleadership)** · [@petarivanovv9](https://daily.dev/petarivanovv9) · 370 upvotes · 16 comments

## Summary

Good database design starts with understanding business domain consequences, not jumping straight to CREATE TABLE. Key principles covered: treat schema changes with the same rigor as code architecture (migrations on 500M-row tables are multi-month projects), normalize to 3NF first then denormalize deliberately based on real query patterns, index foreign keys and high-cardinality WHERE/JOIN/ORDER BY columns while avoiding low-cardinality ones, and use constraints (NOT NULL, UNIQUE, CHECK, foreign keys) to encode business rules directly in the database. Performance problems are usually schema problems in disguise, not tuning problems. Practical advice includes using pg_stat_user_indexes and EXPLAIN ANALYZE to measure impact, and designing for extensibility rather than premature optimization.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thetshaped.dev/p/database-design-foundations-backend-engineers-mistakes-and-lessons>

## Community discussion

Top comments from developers on daily.dev.

**@khauma** · 11 upvotes

> Going through something similar to this right now. Wish you had wrote this 3 months ago...
>
> lol

**@patrickojiambo** · 4 upvotes

> Very common issue among startups. You either over-engineer or do it quick. It's always a debt.

**@cloudx02** · 4 upvotes

> I feel these are good design principles that we all should try to follow but if you already in a nightmare schema then what do you do?

**@xidib78169** · 3 upvotes

> It's quite rare for a personal project to reach a million records in a database, so database experience is something you can only truly gain through hands-on practice. However, I believe this experience only truly comes alive when you've repeatedly built numerous projects. Great article.

**@baothebao** · 2 upvotes

> I hope this would be useful cuz im about to make my very first database.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#backend](https://daily.dev/tags/backend), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/fi73pttiz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/fi73pttiz","headline":"Database Design Doesn't Start With Table. It Starts With Consequences","text":"Shared: Database Design Doesn't Start With Table. It Starts With Consequences","url":"https://daily.dev/posts/fi73pttiz","datePublished":"2026-02-22T08:54:45.561Z","dateModified":"2026-02-22T08:55:30.512Z","author":{"@type":"Person","name":"Petar Ivanov","url":"https://daily.dev/petarivanovv9","image":"https://media.daily.dev/image/upload/s--wKref-so--/f_auto,q_auto/v1703256469/avatars/avatar_7Gt6fIspQR8UFOCBJBaf3","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2700}},"image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":370},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":16}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/tzTa6RGRE"},"comment":[{"@type":"Comment","text":"Going through something similar to this right now. Wish you had wrote this 3 months ago…\nlol","datePublished":"2026-02-23T19:44:05.254Z","url":"https://daily.dev/posts/fI73pTtiz#c-swFbSRAMI","author":{"@type":"Person","name":"Kahlil Wallace","url":"https://daily.dev/khauma","image":"https://media.daily.dev/image/upload/s--QvppE9Ip--/f_auto/v1767378558/avatars/avatar_7eQFeSQRDx0muV3n92gxT?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":11}},{"@type":"Comment","text":"Very common issue among startups. You either over-engineer or do it quick. It’s always a debt.","datePublished":"2026-02-25T07:46:30.651Z","url":"https://daily.dev/posts/fI73pTtiz#c-jC7pToTAk","author":{"@type":"Person","name":"Patrick Ojiambo","url":"https://daily.dev/patrickojiambo","image":"https://media.daily.dev/image/upload/s--OfRAIyr9--/f_auto/v1763363034/avatars/avatar_xOWBSiHPmQ3O3AWoBSsLY?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"I feel these are good design principles that we all should try to follow but if you already in a nightmare schema then what do you do?","datePublished":"2026-02-23T20:43:54.771Z","url":"https://daily.dev/posts/fI73pTtiz#c-WeJPwtyy4","author":{"@type":"Person","name":"Dunamis Junior","url":"https://daily.dev/cloudx02","image":"https://lh3.googleusercontent.com/a/ACg8ocIM93r046kaI74Qn4YCz3g6ptMu2dGiZ_KpgJB7X1UYcw6H85k=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"It’s quite rare for a personal project to reach a million records in a database, so database experience is something you can only truly gain through hands-on practice. However, I believe this experience only truly comes alive when you’ve repeatedly built numerous projects. Great article.","datePublished":"2026-02-25T04:01:43.984Z","url":"https://daily.dev/posts/fI73pTtiz#c-IVy2Aqvmb","author":{"@type":"Person","name":"test","url":"https://daily.dev/xidib78169","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"I hope this would be useful cuz im about to make my very first database.","datePublished":"2026-02-24T06:09:39.925Z","url":"https://daily.dev/posts/fI73pTtiz#c-IR1O5RBMR","author":{"@type":"Person","name":"Bao","url":"https://daily.dev/baothebao","image":"https://avatars.githubusercontent.com/u/180853715?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/engineeringleadership","name":"Engineering Leadership"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Engineering Leadership","item":"https://daily.dev/squads/engineeringleadership"},{"@type":"ListItem","position":3,"name":"Database Design Doesn't Start With Table. It Starts With Consequences"}]}
```

