1:"$Sreact.fragment" 2:I[2199,[],""] 3:I[2523,[],""] 5:I[3253,[],"MetadataBoundary"] 7:I[3253,[],"OutletBoundary"] a:I[5731,[],"AsyncMetadataOutlet"] c:I[3253,[],"ViewportBoundary"] e:I[1666,[],""] :HL["/_next/static/media/e4af272ccee01ff0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/_next/static/css/baf6d4a8f27c2bfb.css","style"] 0:{"P":null,"b":"bAnUhWWJ5_fOi8h8TxCbE","p":"","c":["","blog","database-design-patterns"],"i":false,"f":[[["",{"children":["blog",{"children":[["slug","database-design-patterns","d"],{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/baf6d4a8f27c2bfb.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"dark scroll-smooth","children":["$","body",null,{"className":"__variable_f367f3 min-h-screen bg-background font-sans text-foreground antialiased before:fixed before:inset-0 before:z-0 before:bg-tech-grid before:[mask-image:radial-gradient(ellipse_at_top,black_40%,transparent_80%)] before:pointer-events-none","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["blog",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["slug","database-design-patterns","d"],["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":["$L4",["$","$L5",null,{"children":"$L6"}],null,["$","$L7",null,{"children":["$L8","$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","YnRUfC2d0sLjSdg_FFhGd",{"children":[["$","$Lc",null,{"children":"$Ld"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],null]}],false]],"m":"$undefined","G":["$e","$undefined"],"s":false,"S":true} f:"$Sreact.suspense" 10:I[5731,[],"AsyncMetadata"] 12:I[7758,["758","static/chunks/758-b4e4913f67627b5c.js","723","static/chunks/723-a2cd1bbf256debde.js","953","static/chunks/app/blog/%5Bslug%5D/page-cea8a6766764d7f6.js"],""] 13:I[8723,["758","static/chunks/758-b4e4913f67627b5c.js","723","static/chunks/723-a2cd1bbf256debde.js","953","static/chunks/app/blog/%5Bslug%5D/page-cea8a6766764d7f6.js"],"Image"] 6:["$","$f",null,{"fallback":null,"children":["$","$L10",null,{"promise":"$@11"}]}] 4:["$","div",null,{"className":"relative z-10 min-h-screen","children":[["$","div",null,{"className":"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-xl border-b border-border","children":["$","div",null,{"className":"container flex h-14 items-center justify-between","children":[["$","$L12",null,{"href":"/","className":"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-accent hover:text-foreground h-9 rounded-lg px-3.5 text-xs gap-2","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-left size-4","children":[["$","path","1l729n",{"d":"m12 19-7-7 7-7"}],["$","path","x3x0zl",{"d":"M19 12H5"}],"$undefined"]}],"Back"],"ref":null,"disabled":"$undefined"}],["$","span",null,{"className":"text-sm text-muted-foreground","children":"Blog"}]]}]}],["$","article",null,{"className":"pt-24 pb-24","children":["$","div",null,{"className":"container max-w-3xl","children":[["$","header",null,{"className":"mb-10","children":[["$","div",null,{"className":"flex items-center gap-3 text-sm text-muted-foreground mb-6","children":[["$","span",null,{"className":"inline-flex items-center gap-1.5","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-calendar size-3.5","children":[["$","path","1cmpym",{"d":"M8 2v4"}],["$","path","4m81vk",{"d":"M16 2v4"}],["$","rect","1hopcy",{"width":"18","height":"18","x":"3","y":"4","rx":"2"}],["$","path","8toen8",{"d":"M3 10h18"}],"$undefined"]}],"May 20, 2026"]}],["$","span",null,{"className":"inline-flex items-center gap-1.5","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-clock size-3.5","children":[["$","circle","1mglay",{"cx":"12","cy":"12","r":"10"}],["$","polyline","68esgv",{"points":"12 6 12 12 16 14"}],"$undefined"]}],"7 min read"]}]]}],["$","h1",null,{"className":"text-3xl font-bold tracking-tight sm:text-4xl md:text-5xl text-balance","children":"Database Design Patterns That Scale"}],["$","div",null,{"className":"flex flex-wrap gap-1.5 mt-5","children":[["$","div","MySQL",{"className":"inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 text-xs","children":"MySQL"}],["$","div","SQL Server",{"className":"inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 text-xs","children":"SQL Server"}],["$","div","Architecture",{"className":"inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 text-xs","children":"Architecture"}]]}]]}],["$","div",null,{"className":"relative w-full aspect-[2/1] rounded-xl overflow-hidden mb-12 border border-border","children":[["$","$L13",null,{"src":"https://images.unsplash.com/photo-1544383835-bda2bc66a55d?w=800&h=400&fit=crop","alt":"Database server visualization","fill":true,"className":"object-cover","priority":true}],["$","div",null,{"className":"absolute inset-0 bg-gradient-to-t from-background/40 to-transparent"}]]}],["$","div",null,{"className":"prose prose-invert max-w-none","children":[["$","p","0",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"Good database design is the foundation of any performant application. Here are the patterns I've found most valuable across years of working with SQL Server and MySQL."}],["$","h2","1",{"className":"text-2xl font-bold tracking-tight mt-12 mb-4","children":"Indexing Strategy"}],["$","p","2",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"Indexes are your first line of defense against slow queries. But more indexes aren't always better — each write operation must update every index."}],["$","div","3",{"className":"relative rounded-xl border border-border bg-[#0D0D10] my-6 overflow-hidden","children":[["$","div",null,{"className":"flex items-center gap-1.5 px-4 py-2.5 border-b border-border/50","children":[["$","span",null,{"className":"size-2.5 rounded-full bg-[#FF5F56]"}],["$","span",null,{"className":"size-2.5 rounded-full bg-[#FFBD2E]"}],["$","span",null,{"className":"size-2.5 rounded-full bg-[#27C93F]"}]]}],["$","pre",null,{"className":"p-4 overflow-x-auto text-sm font-mono leading-relaxed text-muted-foreground","children":["$","code",null,{"children":"-- Composite index for common query pattern\nCREATE INDEX idx_orders_user_date\nON orders (user_id, created_at DESC);\n\n-- Covering index to avoid table lookups\nCREATE INDEX idx_posts_status_cover\nON posts (status)\nINCLUDE (title, created_at, author_id);"}]}]]}],["$","h2","4",{"className":"text-2xl font-bold tracking-tight mt-12 mb-4","children":"Normalization vs Denormalization"}],["$","p","5",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"Third Normal Form (3NF) is the sweet spot for most applications. But for read-heavy workloads, strategic denormalization can dramatically improve performance."}],["$","h2","6",{"className":"text-2xl font-bold tracking-tight mt-12 mb-4","children":"Connection Pooling"}],["$","p","7",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"Always use connection pooling. Both SQL Server and MySQL drivers support it natively — make sure it's properly configured for your workload."}],["$","h2","8",{"className":"text-2xl font-bold tracking-tight mt-12 mb-4","children":"Key Takeaways"}],["$","p","9",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"- Index what you query, not everything"}],["$","p","10",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"- Use EXPLAIN to understand query plans"}],["$","p","11",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"- Denormalize only when you've measured the need"}],["$","p","12",{"className":"text-base leading-relaxed text-muted-foreground my-4","children":"- Connection pooling is not optional in production"}]]}],["$","div",null,{"className":"mt-16 pt-8 border-t border-border","children":["$","div",null,{"className":"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4","children":[["$","$L12",null,{"href":"/","className":"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-accent hover:text-foreground h-9 rounded-lg px-3.5 text-xs gap-2","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-left size-4","children":[["$","path","1l729n",{"d":"m12 19-7-7 7-7"}],["$","path","x3x0zl",{"d":"M19 12H5"}],"$undefined"]}],"Back to Home"],"ref":null,"disabled":"$undefined"}],["$","div",null,{"className":"flex gap-2","children":[["$","$L12","building-scalable-apis-laravel",{"href":"/blog/building-scalable-apis-laravel","children":["Building Scalable APIs with La","..."],"className":"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-white/10 bg-white/5 text-foreground backdrop-blur-sm hover:bg-white/10 hover:border-white/20 hover:shadow-lg hover:shadow-cyan-500/10 h-9 rounded-lg px-3.5 text-xs","ref":null,"disabled":"$undefined"}],["$","$L12","modern-frontend-nextjs-app-router",{"href":"/blog/modern-frontend-nextjs-app-router","children":["Modern Frontend with Next.js A","..."],"className":"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-white/10 bg-white/5 text-foreground backdrop-blur-sm hover:bg-white/10 hover:border-white/20 hover:shadow-lg hover:shadow-cyan-500/10 h-9 rounded-lg px-3.5 text-xs","ref":null,"disabled":"$undefined"}]]}]]}]}]]}]}]]}] 9:null d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 8:null 11:{"metadata":[["$","title","0",{"children":"Database Design Patterns That Scale — Tio Setiawan"}],["$","meta","1",{"name":"description","content":"Essential patterns for designing SQL databases that perform well under load — indexing strategies, normalization, and more."}],["$","meta","2",{"property":"og:title","content":"Tio Setiawan — Software Engineer"}],["$","meta","3",{"property":"og:description","content":"Software Engineer specializing in building scalable, user-friendly web applications."}],["$","meta","4",{"property":"og:type","content":"website"}],["$","meta","5",{"name":"twitter:card","content":"summary"}],["$","meta","6",{"name":"twitter:title","content":"Tio Setiawan — Software Engineer"}],["$","meta","7",{"name":"twitter:description","content":"Software Engineer specializing in building scalable, user-friendly web applications."}],["$","link","8",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]],"error":null,"digest":"$undefined"} b:{"metadata":"$11:metadata","error":null,"digest":"$undefined"}