<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tharani Tharan</title>
    <description>The latest articles on DEV Community by Tharani Tharan (@tharani_tharan_d35086d3b9).</description>
    <link>https://dev.to/tharani_tharan_d35086d3b9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3451643%2Fc233fbb7-9276-4444-aab5-1ce639a63875.png</url>
      <title>DEV Community: Tharani Tharan</title>
      <link>https://dev.to/tharani_tharan_d35086d3b9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tharani_tharan_d35086d3b9"/>
    <language>en</language>
    <item>
      <title>CRUD (Create, Read, Update, Delete)</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Mon, 06 Oct 2025 10:19:25 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/crud-create-read-update-delete-4mhl</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/crud-create-read-update-delete-4mhl</guid>
      <description>&lt;p&gt;I’ve explored MongoDB CRUD (Create, Read, Update, Delete) operations using a simple college student schema. This project helped me understand how to perform real-world database operations using MongoDB Atlas.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmifsayfyivees21u0q4k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmifsayfyivees21u0q4k.png" alt=" " width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2r7hkwnvzo295p8xncr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2r7hkwnvzo295p8xncr.png" alt=" " width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9ay36pq04n4k8t07zlj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9ay36pq04n4k8t07zlj.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa196zxa7uf0ewy0aw086.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa196zxa7uf0ewy0aw086.png" alt=" " width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekayoyfw4rnmq719g71j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekayoyfw4rnmq719g71j.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>tutorial</category>
      <category>node</category>
      <category>database</category>
    </item>
    <item>
      <title>INDEXING - HASHING - AND -QUERY</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Sun, 05 Oct 2025 13:38:21 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/indexing-hashing-and-query-4m1b</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/indexing-hashing-and-query-4m1b</guid>
      <description>&lt;p&gt;Indexing is one of the most powerful ways to boost the performance of your SQL queries. In this tutorial, we’ll explore B-Tree, B+Tree, and Hash indexes step-by-step using a Students table example.&lt;/p&gt;

&lt;p&gt;We’ll:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Students table&lt;/li&gt;
&lt;li&gt;Insert sample data&lt;/li&gt;
&lt;li&gt;Build three types of indexes&lt;/li&gt;
&lt;li&gt;Run queries using each index&lt;/li&gt;
&lt;li&gt;Observe how indexing improves retrieval speed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create the Table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbm0eerudh4hj07jzcxd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbm0eerudh4hj07jzcxd6.png" alt=" " width="800" height="667"&gt;&lt;/a&gt;&lt;br&gt;
Insert Sample Records&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsynlcg95dic4h3bcx62.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsynlcg95dic4h3bcx62.png" alt=" " width="614" height="715"&gt;&lt;/a&gt;&lt;br&gt;
Create a B-Tree Index on roll_no&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5eor4jgfyor5ajdsp711.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5eor4jgfyor5ajdsp711.png" alt=" " width="800" height="636"&gt;&lt;/a&gt;&lt;br&gt;
Query Using the B-Tree Index&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmv4cgr1bqyvj9bman7oz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmv4cgr1bqyvj9bman7oz.png" alt=" " width="800" height="644"&gt;&lt;/a&gt;&lt;br&gt;
Query Using the B+ Tree Index&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4vwpp463f3ws7bgmczw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4vwpp463f3ws7bgmczw.png" alt=" " width="800" height="702"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafli8tk1099ukc2gt340.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafli8tk1099ukc2gt340.png" alt=" " width="800" height="670"&gt;&lt;/a&gt;&lt;br&gt;
Query Using the Hash Index&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mxehi4epcgirdl8eqz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mxehi4epcgirdl8eqz6.png" alt=" " width="800" height="656"&gt;&lt;/a&gt;&lt;br&gt;
Conclusion&lt;/p&gt;

&lt;p&gt;In this blog, we learned how to:&lt;br&gt;
-Create B-Tree, B+Tree, and Hash indexes&lt;br&gt;
-Execute optimized queries&lt;br&gt;
-Understand which index type fits which use case&lt;/p&gt;

&lt;p&gt;Indexes make retrieval blazing fast but also consume storage and slow down updates slightly. So, always index wisely!&lt;/p&gt;

</description>
      <category>database</category>
      <category>performance</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>ACID Properties in DBMS</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Sun, 05 Oct 2025 13:32:32 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/acid-properties-in-dbms-nle</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/acid-properties-in-dbms-nle</guid>
      <description>&lt;p&gt;Databases power almost every application we use daily—from banking systems to e-commerce platforms. To ensure data remains reliable, databases follow the ACID principles: Atomicity, Consistency, Isolation, and Durability.&lt;/p&gt;

&lt;p&gt;Setup the Schema&lt;br&gt;
We’ll create a Loans table that stores customer loan detail&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcge749cqji950hmw6u5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcge749cqji950hmw6u5.png" alt=" " width="800" height="462"&gt;&lt;/a&gt;&lt;br&gt;
Enter the values&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fhtfc0po0qhxi3ag1sp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fhtfc0po0qhxi3ag1sp.png" alt=" " width="800" height="471"&gt;&lt;/a&gt;&lt;br&gt;
Result&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzy9bmckh3kcxlnheo47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzy9bmckh3kcxlnheo47.png" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;br&gt;
ATOMICITY&lt;br&gt;
All operations in a transaction must succeed or none should.&lt;/p&gt;

&lt;p&gt;Update and roll back&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1qt9385ovvsx37bcx9k4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1qt9385ovvsx37bcx9k4.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjs5ncncipv8q6n2hs0sl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjs5ncncipv8q6n2hs0sl.png" alt=" " width="800" height="495"&gt;&lt;/a&gt;&lt;br&gt;
Consistency&lt;/p&gt;

&lt;p&gt;Transactions must bring the database from one valid state to another. Invalid data should not enter the system.&lt;/p&gt;

&lt;p&gt;Alter&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10ouj1eo2bkles0pfl1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10ouj1eo2bkles0pfl1b.png" alt=" " width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6hgv0jzbjtaz8bt6iu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6hgv0jzbjtaz8bt6iu5.png" alt=" " width="800" height="549"&gt;&lt;/a&gt;&lt;br&gt;
Isolation&lt;/p&gt;

&lt;p&gt;Concurrent transactions should not affect each other’s intermediate results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8bf81mvqm0rkj217qdv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8bf81mvqm0rkj217qdv.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;br&gt;
Isolation prevents dirty reads between transactions.&lt;/p&gt;

&lt;p&gt;Durability&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81jhgtjpnvjk1o786t23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81jhgtjpnvjk1o786t23.png" alt=" " width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8fh9ej1goo507c1oroz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8fh9ej1goo507c1oroz.png" alt=" " width="800" height="580"&gt;&lt;/a&gt;&lt;br&gt;
Atomicity → All or nothing.&lt;br&gt;
Consistency→ Data always valid.&lt;br&gt;
Isolation → Transactions don’t interfere.&lt;br&gt;
Durability→ Data persists after commit.&lt;br&gt;
By applying ACID principles, databases remain reliable, fault-tolerant, and consistent even in high-concurrency environments like banking systems.&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>Transactions, Deadlocks &amp; Log Based Recovery</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Sun, 05 Oct 2025 13:22:40 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/transactions-deadlocks-log-based-recovery-jnl</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/transactions-deadlocks-log-based-recovery-jnl</guid>
      <description>&lt;p&gt;In this tutorial, we’ll explore transactions, deadlocks, and log-based recovery using a simple Accounts table.&lt;/p&gt;

&lt;p&gt;Let’s create a table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbya8rib7hn557rlxy8s3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbya8rib7hn557rlxy8s3.png" alt=" " width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;insert values&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwsigizmu8kcv0u3psy16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwsigizmu8kcv0u3psy16.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Transaction – Atomicity &amp;amp; Rollback&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53ft8vasa7eo31j40cll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53ft8vasa7eo31j40cll.png" alt=" " width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ROLLBACK&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh148yztc1fnf2vsg7dg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh148yztc1fnf2vsg7dg.png" alt=" " width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UPDATE Accounts&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6at2pav2plgwinczmqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6at2pav2plgwinczmqu.png" alt=" " width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deadlock Simulation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnk7vr7wzh3wbj6rkkpki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnk7vr7wzh3wbj6rkkpki.png" alt=" " width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deadlocks occur when two transactions block each other waiting for resources.&lt;/p&gt;

&lt;p&gt;RESULT&lt;br&gt;
ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction&lt;/p&gt;

&lt;p&gt;Log-Based Recovery&lt;/p&gt;

&lt;p&gt;Modern DBMS (MySQL/PostgreSQL) automatically maintain transaction logs. These logs help undo changes if a transaction fails.&lt;/p&gt;

&lt;p&gt;UPDATE Accounts&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6m81wvcam34b74y1516.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6m81wvcam34b74y1516.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SELECT * FROM Accounts;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhe57bqol7tsp25a9rwo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhe57bqol7tsp25a9rwo.png" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Summary&lt;/p&gt;

&lt;p&gt;Transactions guarantee atomicity; either all operations succeed or none.&lt;br&gt;
Deadlocks occur when transactions block each other; they must be handled with care.&lt;br&gt;
Log-based recovery ensures durability and recoverability.&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Cursor and Trigger</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Sun, 05 Oct 2025 13:04:37 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/cursor-and-trigger-539j</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/cursor-and-trigger-539j</guid>
      <description>&lt;p&gt;Cursor with condition → Fetch employee names whose salary &amp;gt; 50,000.&lt;/p&gt;

&lt;p&gt;AFTER INSERT Trigger → Log every new student entry into an audit table.&lt;/p&gt;

&lt;p&gt;Cursor Example (Process Cursor with Condition)&lt;/p&gt;

&lt;p&gt;CREATE TABLE Employee (&lt;br&gt;
EmpID INT PRIMARY KEY,&lt;br&gt;
EmpName VARCHAR(50),&lt;br&gt;
Salary INT&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ankcbogzx0xmp9szwsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ankcbogzx0xmp9szwsw.png" alt=" " width="800" height="646"&gt;&lt;/a&gt;&lt;br&gt;
INSERT INTO Employee VALUES&lt;br&gt;
(1, 'Arjun', 45000),&lt;br&gt;
(2, 'Priya', 60000),&lt;br&gt;
(3, 'Kiran', 75000),&lt;br&gt;
(4, 'Meera', 48000),&lt;br&gt;
(5, 'Rahul', 90000);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmjo87atx99m1s25p98e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmjo87atx99m1s25p98e.png" alt=" " width="800" height="638"&gt;&lt;/a&gt;&lt;br&gt;
Output&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99cdwictq9iet0c454pu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99cdwictq9iet0c454pu.png" alt=" " width="800" height="631"&gt;&lt;/a&gt;&lt;br&gt;
Cursor Code (Employees with Salary &amp;gt; 50,000)&lt;br&gt;
DECLARE&lt;br&gt;
CURSOR high_salary_cursor IS&lt;br&gt;
SELECT EmpName FROM Employee WHERE Salary &amp;gt; 50000;&lt;br&gt;
v_name Employee.EmpName%TYPE;&lt;br&gt;
BEGIN&lt;br&gt;
OPEN high_salary_cursor;&lt;br&gt;
LOOP&lt;br&gt;
FETCH high_salary_cursor INTO v_name;&lt;br&gt;
EXIT WHEN high_salary_cursor%NOTFOUND;&lt;br&gt;
DBMS_OUTPUT.PUT_LINE('Employee: ' || v_name);&lt;br&gt;
END LOOP;&lt;br&gt;
CLOSE high_salary_cursor;&lt;br&gt;
END;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmzy11xkx54k11s3pudj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmzy11xkx54k11s3pudj.png" alt=" " width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
Trigger Example (AFTER INSERT Trigger)&lt;br&gt;
Create Student and Audit Tables&lt;br&gt;
CREATE TABLE Studt (&lt;br&gt;
StudentID VARCHAR(10) PRIMARY KEY,&lt;br&gt;
StudentName VARCHAR(50)&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fx2em5410s4wika15g3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fx2em5410s4wika15g3.png" alt=" " width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CREATE TABLE Student_Audit (&lt;br&gt;
AuditID INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,&lt;br&gt;
StudentID VARCHAR(10),&lt;br&gt;
StudentName VARCHAR(50),&lt;br&gt;
ActionDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6wqh1n9fj03d5btfnp2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6wqh1n9fj03d5btfnp2.png" alt=" " width="800" height="617"&gt;&lt;/a&gt;&lt;br&gt;
Create AFTER INSERT Trigger&lt;br&gt;
CREATE OR REPLACE TRIGGER student_insert_audit&lt;br&gt;
AFTER INSERT ON Students&lt;br&gt;
FOR EACH ROW&lt;br&gt;
BEGIN&lt;br&gt;
INSERT INTO Student_Audit (StudentID, StudentName)&lt;br&gt;
VALUES (:NEW.StudentID, :NEW.StudentName);&lt;br&gt;
END;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finjs0u7rsdboxk1m012a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finjs0u7rsdboxk1m012a.png" alt=" " width="800" height="639"&gt;&lt;/a&gt;&lt;br&gt;
Insert Data into Studt&lt;br&gt;
INSERT INTO Students VALUES ('S01', 'Arjun');&lt;br&gt;
INSERT INTO Students VALUES ('S02', 'Priya');&lt;br&gt;
INSERT INTO Students VALUES ('S03', 'Kiran');&lt;/p&gt;

&lt;p&gt;SELECT * FROM Student_Audit;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgzf5kh2z1rprcxbx7f8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgzf5kh2z1rprcxbx7f8.png" alt=" " width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>tutorial</category>
      <category>sql</category>
      <category>beginners</category>
    </item>
    <item>
      <title>SQL Normalization (1NF to 3NF) – Explained with Oracle Live SQL Implementation</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Sun, 05 Oct 2025 12:55:44 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/sql-normalization-1nf-to-3nf-explained-with-oracle-live-sql-implementation-432o</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/sql-normalization-1nf-to-3nf-explained-with-oracle-live-sql-implementation-432o</guid>
      <description>&lt;p&gt;Base Table (Unnormalized)&lt;/p&gt;

&lt;p&gt;We start with a single table that contains redundant data (students, courses, and instructors in one table).&lt;/p&gt;

&lt;p&gt;StudentID   StudentName CourseID    CourseName  Instructor  InstructorPhone&lt;br&gt;
S01 Arjun   C101    DBMS    Dr. Kumar   9876543210&lt;br&gt;
S01 Arjun   C102    Data Mining Dr. Mehta   9123456780&lt;br&gt;
S02 Priya   C101    DBMS    Dr. Kumar   9876543210&lt;br&gt;
S03 Kiran   C103    AI  Dr. Rao 9988776655&lt;br&gt;
1NF Implementation&lt;/p&gt;

&lt;p&gt;Remove repeating groups and ensure atomicity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5o8jzyhuqn84x20ck60.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5o8jzyhuqn84x20ck60.png" alt=" " width="800" height="401"&gt;&lt;/a&gt;&lt;br&gt;
2NF Implementation&lt;/p&gt;

&lt;p&gt;Eliminate partial dependencies by separating students and courses&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbuvc0sjnpoiwyxwtzwo2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbuvc0sjnpoiwyxwtzwo2.png" alt=" " width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gfl44snpqtcruvwwacc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gfl44snpqtcruvwwacc.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ltmo4pctogrt5d1vnw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ltmo4pctogrt5d1vnw6.png" alt=" " width="800" height="409"&gt;&lt;/a&gt;&lt;br&gt;
3NF Implementation&lt;/p&gt;

&lt;p&gt;Remove transitive dependencies (InstructorPhone depends on Instructor, not Course).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp8tjmznyt1ngfjaa1q0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp8tjmznyt1ngfjaa1q0.png" alt=" " width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbw1pey15tpkrxjlwc1pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbw1pey15tpkrxjlwc1pm.png" alt=" " width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p1v8dr1lcbmwjk5bxjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p1v8dr1lcbmwjk5bxjy.png" alt=" " width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsdww3dra6iif11p0qup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsdww3dra6iif11p0qup.png" alt=" " width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
Oracle Live SQL Screenshots&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01gxb27n6jlr778ox6fo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01gxb27n6jlr778ox6fo.png" alt=" " width="800" height="589"&gt;&lt;/a&gt;&lt;br&gt;
Normalization helps:&lt;/p&gt;

&lt;p&gt;Remove redundancy&lt;/p&gt;

&lt;p&gt;Maintain data integrity&lt;/p&gt;

&lt;p&gt;Simplify updates and retrieval&lt;/p&gt;

&lt;p&gt;Implemented using:&lt;/p&gt;

&lt;p&gt;🔹 Oracle Live SQL&lt;br&gt;
🔹 SQL DDL + JOIN Queries&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🚀 Learning SQL with Oracle Live SQL – Student Database Example</title>
      <dc:creator>Tharani Tharan</dc:creator>
      <pubDate>Fri, 22 Aug 2025 03:14:01 +0000</pubDate>
      <link>https://dev.to/tharani_tharan_d35086d3b9/learning-sql-with-oracle-live-sql-student-database-example-3ank</link>
      <guid>https://dev.to/tharani_tharan_d35086d3b9/learning-sql-with-oracle-live-sql-student-database-example-3ank</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwnqcm6be4w4vbp480mg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwnqcm6be4w4vbp480mg.png" alt=" " width="800" height="398"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkptm83enoyj4599n54sl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkptm83enoyj4599n54sl.png" alt=" " width="800" height="385"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzyuwqb2ovxebbnvl2xmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzyuwqb2ovxebbnvl2xmt.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;br&gt;
Hello Dev Community! 👋&lt;br&gt;
Today I want to share my hands-on practice with SQL using Oracle Live SQL. I created a simple Students database schema and explored various SQL commands to strengthen my database skills. 🧑‍💻&lt;/p&gt;




&lt;p&gt;🏗 Step 1: Creating the Students Table&lt;/p&gt;

&lt;p&gt;I started by creating a table called Students with important constraints:&lt;/p&gt;

&lt;p&gt;CREATE TABLE Students (&lt;br&gt;
    StudentID NUMBER PRIMARY KEY,&lt;br&gt;
    Name VARCHAR2(50) NOT NULL,&lt;br&gt;
    Dept VARCHAR2(30),&lt;br&gt;
    DOB DATE,&lt;br&gt;
    Email VARCHAR2(50) UNIQUE&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;🔑 Key Points:&lt;/p&gt;

&lt;p&gt;PRIMARY KEY ensures each student has a unique ID.&lt;/p&gt;

&lt;p&gt;NOT NULL prevents empty names.&lt;/p&gt;

&lt;p&gt;UNIQUE on Email avoids duplicates.&lt;/p&gt;




&lt;p&gt;📞 Step 2: Adding a Phone Number Column&lt;/p&gt;

&lt;p&gt;Later, I altered the table to include a PhoneNo column that can store 10-digit numbers:&lt;/p&gt;

&lt;p&gt;ALTER TABLE Students&lt;br&gt;
ADD PhoneNo NUMBER(10);&lt;/p&gt;

&lt;p&gt;This way, each student record can also include a contact number.&lt;/p&gt;




&lt;p&gt;✍ Step 3: Inserting Data&lt;/p&gt;

&lt;p&gt;I inserted sample records into the table, making sure each student belongs to a different department:&lt;/p&gt;

&lt;p&gt;INSERT INTO Students (StudentID, Name, Dept, DOB, Email)&lt;br&gt;
VALUES (1, 'Arjun Kumar', 'Computer Science', TO_DATE('2003-05-15', 'YYYY-MM-DD'), '&lt;a href="mailto:arjun.kumar@example.com"&gt;arjun.kumar@example.com&lt;/a&gt;');&lt;/p&gt;

&lt;p&gt;INSERT INTO Students (StudentID, Name, Dept, DOB, Email)&lt;br&gt;
VALUES (2, 'Meera Sharma', 'Electronics', TO_DATE('2002-11-20', 'YYYY-MM-DD'), '&lt;a href="mailto:meera.sharma@example.com"&gt;meera.sharma@example.com&lt;/a&gt;');&lt;/p&gt;

&lt;p&gt;INSERT INTO Students (StudentID, Name, Dept, DOB, Email)&lt;br&gt;
VALUES (3, 'Rahul Singh', 'Mechanical', TO_DATE('2004-02-10', 'YYYY-MM-DD'), '&lt;a href="mailto:rahul.singh@example.com"&gt;rahul.singh@example.com&lt;/a&gt;');&lt;/p&gt;




&lt;p&gt;🔎 Step 4: Playing with Queries&lt;/p&gt;

&lt;p&gt;I experimented with some interesting queries:&lt;/p&gt;

&lt;p&gt;✅ Display names in UPPERCASE &amp;amp; email length&lt;/p&gt;

&lt;p&gt;SELECT &lt;br&gt;
    UPPER(Name) AS StudentName,&lt;br&gt;
    LENGTH(Email) AS EmailLength&lt;br&gt;
FROM Students;&lt;/p&gt;

&lt;p&gt;✅ Show each department with student count (only if more than 2 students)&lt;/p&gt;

&lt;p&gt;SELECT Dept, COUNT(&lt;em&gt;) AS StudentCount&lt;br&gt;
FROM Students&lt;br&gt;
GROUP BY Dept&lt;br&gt;
HAVING COUNT(&lt;/em&gt;) &amp;gt; 2;&lt;/p&gt;




&lt;p&gt;🎯 Key Learnings&lt;/p&gt;

&lt;p&gt;How to create and alter tables with constraints&lt;/p&gt;

&lt;p&gt;Using aggregate functions with GROUP BY and HAVING&lt;/p&gt;

&lt;p&gt;Applying string functions like UPPER() and LENGTH()&lt;/p&gt;

&lt;p&gt;Writing meaningful queries to analyze data&lt;/p&gt;




&lt;p&gt;🌟 Final Thoughts&lt;/p&gt;

&lt;p&gt;This small project was a great way to solidify my SQL fundamentals. Practicing on Oracle Live SQL helped me understand how constraints, functions, and queries work in real scenarios.&lt;/p&gt;

&lt;p&gt;💡 Next, I plan to extend this schema by adding a Courses table and explore JOIN operations.&lt;/p&gt;




&lt;p&gt;👉 What do you think about this simple schema?&lt;br&gt;
Would love to hear your suggestions and improvements!&lt;/p&gt;

&lt;h1&gt;
  
  
  SQL #Oracle #Database #Learning #DevCommunity #100DaysOfCode
&lt;/h1&gt;




&lt;p&gt;Would you like me to also add an ER diagram illustration for the blog (like Students table structure) so the post looks more visual on dev.to?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
