<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SQL on Chandan Kumar Dash</title><link>https://ckdash.com/tags/sql/</link><description>Recent content in SQL on Chandan Kumar Dash</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 08 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ckdash.com/tags/sql/index.xml" rel="self" type="application/rss+xml"/><item><title>RDBMS: Bringing Order to Chaos</title><link>https://ckdash.com/blogs/system-design/rdbms/</link><pubDate>Sun, 08 Feb 2026 00:00:00 +0000</pubDate><guid>https://ckdash.com/blogs/system-design/rdbms/</guid><description>&lt;p&gt;The step up from a File-Based System is the &lt;strong&gt;Relational Database Management System (RDBMS)&lt;/strong&gt;.
Examples: &lt;strong&gt;MySQL, PostgreSQL, Oracle, SQL Server&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Instead of loose files, data is stored in &lt;strong&gt;Tables&lt;/strong&gt; with strict structures.&lt;/p&gt;
&lt;h2 id="core-concepts"&gt;Core Concepts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tables&lt;/strong&gt;: Like Excel sheets (Rows &amp;amp; Columns).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relationships&lt;/strong&gt;: Tables are linked via &lt;strong&gt;Foreign Keys&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Schema&lt;/strong&gt;: The structure is fixed. You must define columns (e.g., &lt;code&gt;Age&lt;/code&gt; is an Integer) upfront.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="why-rdbms-wins-vs-files"&gt;Why RDBMS Wins (vs. Files)
&lt;/h2&gt;&lt;h3 id="1-no-redundancy"&gt;1. No Redundancy
&lt;/h3&gt;&lt;p&gt;Data is normalized.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customer Table&lt;/strong&gt;: Stores Name &amp;amp; Address once.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Order Table&lt;/strong&gt;: Links to Customer ID.
If the customer moves, you update the address in &lt;strong&gt;one place&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="2-consistency--integrity"&gt;2. Consistency &amp;amp; Integrity
&lt;/h3&gt;&lt;p&gt;RDBMS enforces rules.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Constraints&lt;/strong&gt;: You can&amp;rsquo;t enter &amp;ldquo;Hello&amp;rdquo; into an &lt;code&gt;Age&lt;/code&gt; column.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ACID Properties&lt;/strong&gt;: Transactions are &amp;ldquo;All or Nothing&amp;rdquo;. If money leaves Account A but fails to reach Account B, the entire transaction rolls back.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="3-powerful-querying-sql"&gt;3. Powerful Querying (SQL)
&lt;/h3&gt;&lt;p&gt;Instead of writing a script to open 1,000 files, you write:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;SELECT&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;*&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;FROM&lt;/span&gt; Students &lt;span style="color:#ff79c6"&gt;WHERE&lt;/span&gt; GPA &lt;span style="color:#ff79c6"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;3&lt;/span&gt;.&lt;span style="color:#bd93f9"&gt;5&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class="mermaid"&gt;
%%{init: {&amp;#39;theme&amp;#39;: &amp;#39;dark&amp;#39;}}%%
erDiagram
CUSTOMER ||--o{ ORDER : places
CUSTOMER {
int id PK
string name
string email
}
ORDER {
int id PK
int customer_id FK
string product
}
&lt;/pre&gt;
&lt;h2 id="the-limitations"&gt;The Limitations
&lt;/h2&gt;&lt;p&gt;RDBMS is great, but it has flaws.&lt;/p&gt;
&lt;h3 id="1-rigid-schema"&gt;1. Rigid Schema
&lt;/h3&gt;&lt;p&gt;Changing the structure is hard.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: You want to add a &amp;ldquo;GitHub Profile&amp;rdquo; column to the User table.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Problem&lt;/strong&gt;: You have to run an &lt;code&gt;ALTER TABLE&lt;/code&gt; command, which can lock the database and cause downtime for millions of rows.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="2-scalability-issues"&gt;2. Scalability Issues
&lt;/h3&gt;&lt;p&gt;RDBMS is designed for &lt;strong&gt;Vertical Scaling&lt;/strong&gt; (Bigger Server).
&lt;strong&gt;Horizontal Scaling (Sharding)&lt;/strong&gt; is very difficult because relationships (JOINs) heavily limit how you can split data across servers.&lt;/p&gt;
&lt;h2 id="comparison"&gt;Comparison
&lt;/h2&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left"&gt;Feature&lt;/th&gt;
&lt;th style="text-align: left"&gt;File System&lt;/th&gt;
&lt;th style="text-align: left"&gt;RDBMS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Unstructured Files&lt;/td&gt;
&lt;td style="text-align: left"&gt;Structured Tables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;strong&gt;Redundancy&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;High (Duplicate data)&lt;/td&gt;
&lt;td style="text-align: left"&gt;Low (Normalization)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;strong&gt;Consistency&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Risk of mismatch&lt;/td&gt;
&lt;td style="text-align: left"&gt;Enforced (ACID)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;strong&gt;Querying&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Manual Parsing&lt;/td&gt;
&lt;td style="text-align: left"&gt;SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;strong&gt;Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Hard&lt;/td&gt;
&lt;td style="text-align: left"&gt;Vertical (Good), Horizontal (Hard)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;RDBMS is the industry standard for a reason. It provides safety and structure.
However, when you need massive scale or flexible data structures, you might hit a wall. That&amp;rsquo;s where &lt;strong&gt;NoSQL&lt;/strong&gt; comes in (stay tuned!).&lt;/p&gt;</description></item></channel></rss>