{"id":250,"date":"2026-04-16T15:31:26","date_gmt":"2026-04-16T15:31:26","guid":{"rendered":"https:\/\/bkbc.net\/index.php\/2026\/04\/16\/a-guide-to-relational-database-design\/"},"modified":"2026-04-16T15:31:26","modified_gmt":"2026-04-16T15:31:26","slug":"a-guide-to-relational-database-design","status":"publish","type":"post","link":"https:\/\/bkbc.net\/index.php\/2026\/04\/16\/a-guide-to-relational-database-design\/","title":{"rendered":"A Guide to Relational Database Design"},"content":{"rendered":"<div>\n<p style=\"text-align: justify;\">The hardest part of relational database design is not using SQL. The syntax for creating tables, defining keys, and writing joins can be learnt and mastered over time. The difficult part is to develop the thinking that comes before any code gets written, and answering questions about the design of the database.<\/p>\n<ul>\n<li>\n<p style=\"text-align: justify;\">Which pieces of information deserve their own table?<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\">How should tables reference each other?<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\">How much redundancy is too much?<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">These are design decisions, and getting them right means our data stays consistent, our queries stay fast, and changes are painless. Getting them wrong means spending months patching problems that were baked into the structure from day one.<\/p>\n<p style=\"text-align: justify;\">In this article, we cover the core concepts that inform those decisions. We\u2019ll look at tables, keys, relationships, normalization, and joins, with each concept building on the last.<\/p>\n<div class=\"captioned-image-container\">\n<figure><a class=\"image-link image2 is-viewable-img\" target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/%24s_!bl9u!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png\" data-component-name=\"Image2ToDOM\"><\/p>\n<div class=\"image2-inset\"><picture><source type=\"image\/webp\" srcset=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 424w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 848w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 1272w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 1456w\" sizes=\"100vw\"><img decoding=\"async\" src=\"https:\/\/bkbc.net\/wp-content\/uploads\/2026\/04\/c11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png\" width=\"1456\" height=\"1698\" data-attrs='{\"src\":\"https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/c11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png\",\"srcNoWatermark\":null,\"fullscreen\":null,\"imageSize\":null,\"height\":1698,\"width\":1456,\"resizeWidth\":null,\"bytes\":446506,\"alt\":null,\"title\":null,\"type\":\"image\/png\",\"href\":null,\"belowTheFold\":false,\"topImage\":true,\"internalRedirect\":\"https:\/\/blog.bytebytego.com\/i\/194403053?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png\",\"isProcessing\":false,\"align\":null,\"offset\":false}' class=\"sizing-normal\" alt=\"\" srcset=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 424w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 848w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 1272w, https:\/\/substackcdn.com\/image\/fetch\/$s_!bl9u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ad2cf-e9f9-46f0-b662-f0fc2d2a95f0_2250x2624.png 1456w\" sizes=\"100vw\" fetchpriority=\"high\"><\/picture>\n<div class=\"image-link-expand\">\n<div class=\"pencraft pc-display-flex pc-gap-8 pc-reset\"><button tabindex=\"0\" type=\"button\" class=\"pencraft pc-reset pencraft icon-container restack-image\"><svg role=\"img\" width=\"20\" height=\"20\" viewbox=\"0 0 20 20\" fill=\"none\" stroke-width=\"1.5\" stroke=\"var(--color-fg-primary)\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><g><title><\/title><path d=\"M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882\"><\/path><\/g><\/svg><\/button><button tabindex=\"0\" type=\"button\" class=\"pencraft pc-reset pencraft icon-container view-image\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize2 lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"><\/polyline><polyline points=\"9 21 3 21 3 15\"><\/polyline><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"><\/line><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"><\/line><\/svg><\/button><\/div>\n<\/div>\n<\/div>\n<p><\/a><\/figure>\n<\/div>\n<h2>Tables and the Language That Drives Them<\/h2>\n<p>\n          <a href=\"https:\/\/blog.bytebytego.com\/p\/a-guide-to-relational-database-design\"><br \/>\n              Read more<br \/>\n          <\/a>\n      <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div>In this article, we cover the core concepts that inform those decisions. We\u2019ll look at tables, keys, relationships, normalization, and joins, with each concept building on the last.<\/div>\n","protected":false},"author":1,"featured_media":251,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,6],"tags":[113,115,112,114],"class_list":["post-250","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-to-head-2-head-comparison","category-technology","tag-architecture","tag-diagrams","tag-software","tag-system-design"],"_links":{"self":[{"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":0,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/media\/251"}],"wp:attachment":[{"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bkbc.net\/index.php\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}