<?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: Shadrack Tesot</title>
    <description>The latest articles on DEV Community by Shadrack Tesot (@tesot45).</description>
    <link>https://dev.to/tesot45</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%2F3822854%2F54c1f17d-c4d7-4163-8333-301268ce1755.png</url>
      <title>DEV Community: Shadrack Tesot</title>
      <link>https://dev.to/tesot45</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tesot45"/>
    <language>en</language>
    <item>
      <title>Building a School Database from Scratch: A Practical Introduction to SQL</title>
      <dc:creator>Shadrack Tesot</dc:creator>
      <pubDate>Sun, 12 Apr 2026 21:03:37 +0000</pubDate>
      <link>https://dev.to/tesot45/building-a-school-database-from-scratch-a-practical-introduction-to-sql-3l73</link>
      <guid>https://dev.to/tesot45/building-a-school-database-from-scratch-a-practical-introduction-to-sql-3l73</guid>
      <description>&lt;h2&gt;
  
  
  Building a school database from scratch
&lt;/h2&gt;

&lt;p&gt;There’s a certain kind of satisfaction that comes from building something structured out of nothing. No shortcuts, no pre-built templates, just a blank database and a problem to solve.&lt;/p&gt;

&lt;p&gt;That was the starting point for this project: designing and managing a database for Nairobi Academy, a secondary school. What began as a simple assignment quickly turned into a practical lesson in how data systems are built, maintained, and questioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two Sides of SQL: Structure vs Action
&lt;/h2&gt;

&lt;p&gt;Every SQL workflow sits on two pillars: &lt;strong&gt;DDL (Data Definition Language)&lt;/strong&gt; and &lt;strong&gt;DML (Data Manipulation Language)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;DDL is about structure. It is where you define the blueprint by creating schemas, tables, and columns.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;SCHEMA&lt;/span&gt; &lt;span class="n"&gt;nairobi_academy&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;USE&lt;/span&gt; &lt;span class="n"&gt;nairobi_academy&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;student_id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="nb"&gt;CHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DML is about action. Once the structure is in place, DML handles everything that happens inside it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Alice'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Wanjiku'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The distinction becomes clearer in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DDL defines the system&lt;/li&gt;
&lt;li&gt;DML works with the data inside it&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the System and Adjusting It Along the Way
&lt;/h2&gt;

&lt;p&gt;Creating the tables with &lt;code&gt;CREATE&lt;/code&gt; felt straightforward at first. But once requirements started shifting, things became more realistic.&lt;/p&gt;

&lt;p&gt;At one point, I had to modify the structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;ADD&lt;/span&gt; &lt;span class="n"&gt;phone_number&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;subjects&lt;/span&gt;
&lt;span class="k"&gt;RENAME&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;credits&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;credit_hours&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And eventually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;phone_number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This back-and-forth made it clear that databases are not static. They evolve with changing needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing Data to Life
&lt;/h2&gt;

&lt;p&gt;With the structure in place, the next step was filling it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;student_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subject_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;exam_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;78&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2024-03-15'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once data was in place, I needed to maintain it.&lt;/p&gt;

&lt;p&gt;Updating a student’s record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;student_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fixing incorrect marks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;59&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removing a cancelled record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These operations made the database feel dynamic. Data wasn’t just stored, it was actively managed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering Data with WHERE
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;WHERE&lt;/code&gt; clause is where SQL becomes more than storage. It becomes a tool for asking focused questions.&lt;/p&gt;

&lt;p&gt;For example, finding all Form 4 students:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finding high-performing students:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using ranges:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="k"&gt;BETWEEN&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using multiple values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mombasa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kisumu'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using patterns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'A%'&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'E%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this stage, SQL starts to feel less like writing commands and more like working through logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning Data into Meaning with CASE WHEN
&lt;/h2&gt;

&lt;p&gt;Raw data gives numbers, but interpretation gives insight.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;CASE WHEN&lt;/code&gt;, I transformed exam results into performance categories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;student_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;CASE&lt;/span&gt; 
           &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Distinction'&lt;/span&gt;
           &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Merit'&lt;/span&gt;
           &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Pass'&lt;/span&gt;
           &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="s1"&gt;'Fail'&lt;/span&gt;
       &lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;performance&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And classified students:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;CASE&lt;/span&gt;
           &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Form 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Senior'&lt;/span&gt;
           &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="s1"&gt;'Junior'&lt;/span&gt;
       &lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;student_level&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This made the data easier to interpret and more useful for decision-making.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reflection
&lt;/h2&gt;

&lt;p&gt;The most challenging part of this assignment was not the syntax. It was the thinking behind it.&lt;/p&gt;

&lt;p&gt;Combining conditions correctly took practice. Small mistakes could completely change the output. Remembering to always use &lt;code&gt;WHERE&lt;/code&gt; with &lt;code&gt;UPDATE&lt;/code&gt; and &lt;code&gt;DELETE&lt;/code&gt; was especially important.&lt;/p&gt;

&lt;p&gt;What stood out the most was how quickly SQL shifts from technical to analytical. Once the basics are in place, it becomes less about writing queries and more about asking better questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This project started as a database exercise but turned into something broader.&lt;/p&gt;

&lt;p&gt;Building tables, inserting data, and running queries are all important steps. But the real value comes from understanding how everything connects. Structure supports data, and data supports decisions.&lt;/p&gt;

&lt;p&gt;SQL, at its core, is not just about managing information. It is about making that information useful.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>postgressql</category>
      <category>database</category>
      <category>analyst</category>
    </item>
    <item>
      <title>Understanding Data Modeling in Power BI: Joins, Relationships, and Schemas Explained</title>
      <dc:creator>Shadrack Tesot</dc:creator>
      <pubDate>Sun, 29 Mar 2026 20:16:49 +0000</pubDate>
      <link>https://dev.to/tesot45/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-340k</link>
      <guid>https://dev.to/tesot45/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-340k</guid>
      <description>&lt;p&gt;When I started learning data analysis, I thought Power BI was mostly about dashboards and visuals. Clean charts, nice colors, maybe a few filters.&lt;/p&gt;

&lt;p&gt;Then I hit data modeling.&lt;/p&gt;

&lt;p&gt;That’s when things got real.&lt;/p&gt;

&lt;p&gt;Because no matter how good your visuals look, if your data model is wrong, your insights will be wrong too. And in the real world wrong insights cost money.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Data Modeling?
&lt;/h2&gt;

&lt;p&gt;Data modeling is how you structure, connect, and organize your data so that it can be analyzed correctly and efficiently.&lt;/p&gt;

&lt;p&gt;In Power BI, data modeling happens after loading your data, and it determines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How tables relate to each other&lt;/li&gt;
&lt;li&gt;How filters behave&lt;/li&gt;
&lt;li&gt;How calculations work&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SQL Joins (The Foundation of Data Combination)
&lt;/h2&gt;

&lt;p&gt;Before Power BI relationships, you need to understand joins. These are done in Power Query.&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%2Fmoodbjbgntqulr12iaoa.jpg" 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%2Fmoodbjbgntqulr12iaoa.jpg" alt="Joins" width="336" height="862"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. INNER JOIN
&lt;/h3&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%2Fkd7puasiqj2fbbsmi956.jpg" 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%2Fkd7puasiqj2fbbsmi956.jpg" alt="Inner Join" width="800" height="726"&gt;&lt;/a&gt;&lt;br&gt;
Returns only matching records in both tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Orders table&lt;/li&gt;
&lt;li&gt;Customers table
→ Only customers who have placed orders&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. LEFT JOIN
&lt;/h3&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%2Fez033rxvsfp4g9kx8bba.jpg" 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%2Fez033rxvsfp4g9kx8bba.jpg" alt="Left Join" width="464" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Returns all records from the left table, and matching ones from the right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
All orders, even if customer details are missing:**&lt;/p&gt;

&lt;h3&gt;
  
  
  3. RIGHT JOIN
&lt;/h3&gt;

&lt;p&gt;Same as LEFT JOIN but reversed. Returns all records from the right table, and matching ones from the right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
All customers, even if they haven’t placed orders.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. FULL OUTER JOIN
&lt;/h3&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%2Fg5i8klvjflaus2l0urvl.jpg" 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%2Fg5i8klvjflaus2l0urvl.jpg" alt="Full Outer Join" width="464" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Returns everything from both tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All customers&lt;/li&gt;
&lt;li&gt;All orders&lt;/li&gt;
&lt;li&gt;Whether they match or not&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. LEFT ANTI JOIN
&lt;/h3&gt;

&lt;p&gt;Returns rows in the left table that &lt;strong&gt;don’t exist&lt;/strong&gt; in the right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Orders without matching customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. RIGHT ANTI JOIN
&lt;/h3&gt;

&lt;p&gt;Returns rows in the right table that &lt;strong&gt;don’t exist&lt;/strong&gt; in the left.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to Create Joins in Power BI
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Home → Transform Data&lt;/strong&gt; (opens Power Query)&lt;/li&gt;
&lt;li&gt;Select your table&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Merge Queries&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Choose:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Second table&lt;/li&gt;
&lt;li&gt;Matching column&lt;/li&gt;
&lt;li&gt;Join type (Inner, Left, etc.)

&lt;ol&gt;
&lt;li&gt;Expand the merged column&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s how joins are actually done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Power BI Relationships
&lt;/h2&gt;

&lt;p&gt;This is where most beginners get confused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Joins&lt;/strong&gt; combine tables into one.&lt;br&gt;
&lt;strong&gt;Relationships&lt;/strong&gt; keep tables separate but connected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Relationships
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. One-to-Many (1:M)
&lt;/h4&gt;

&lt;p&gt;Most common.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customers (1)&lt;/li&gt;
&lt;li&gt;Orders (Many)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One customer → many orders&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Many-to-Many (M:M)
&lt;/h4&gt;

&lt;p&gt;Both sides have duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Students and Courses&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. One-to-One (1:1)
&lt;/h4&gt;

&lt;p&gt;Rare.&lt;/p&gt;

&lt;p&gt;Used when splitting data for performance or organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active vs Inactive Relationships
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Active&lt;/strong&gt; → used by default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inactive&lt;/strong&gt; → only used when explicitly called (via DAX like &lt;code&gt;USERELATIONSHIP&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Order Date vs Delivery Date&lt;br&gt;
Only one can be active at a time&lt;/p&gt;

&lt;h3&gt;
  
  
  Cardinality
&lt;/h3&gt;

&lt;p&gt;Defines how tables relate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1:1&lt;/li&gt;
&lt;li&gt;1:M&lt;/li&gt;
&lt;li&gt;M:M&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cross Filter Direction
&lt;/h3&gt;

&lt;p&gt;Controls how filters move between tables.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Single direction&lt;/strong&gt; → safer, recommended&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Both directions&lt;/strong&gt; → more flexible, but risky if misused&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Where to Create Relationships in Power BI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Method 1: Model View&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Model View (diagram icon)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Drag one column onto another&lt;/li&gt;
&lt;li&gt;Set:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Cardinality&lt;/li&gt;
&lt;li&gt;Cross-filter direction&lt;/li&gt;
&lt;li&gt;Active/inactive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Method 2: Manage Relationships&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Home → Manage Relationships&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select tables and columns&lt;/li&gt;
&lt;li&gt;Configure settings&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Joins vs Relationships (Critical Difference)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Joins&lt;/th&gt;
&lt;th&gt;Relationships&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Done in Power Query&lt;/td&gt;
&lt;td&gt;Done in Model View&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Combine tables&lt;/td&gt;
&lt;td&gt;Keep tables separate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Static&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Used for shaping data&lt;/td&gt;
&lt;td&gt;Used for analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Simple way to remember:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Joins = data preparation&lt;/li&gt;
&lt;li&gt;Relationships = data analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fact vs Dimension Tables
&lt;/h2&gt;

&lt;p&gt;This is the backbone of good data models.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact Tables
&lt;/h3&gt;

&lt;p&gt;Contain measurable data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sales amount&lt;/li&gt;
&lt;li&gt;Quantity sold&lt;/li&gt;
&lt;li&gt;Revenue&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dimension Tables
&lt;/h3&gt;

&lt;p&gt;Contain descriptive data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer name&lt;/li&gt;
&lt;li&gt;Product category&lt;/li&gt;
&lt;li&gt;Date&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;Fact Table: Orders&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Order ID&lt;/li&gt;
&lt;li&gt;Product ID&lt;/li&gt;
&lt;li&gt;Customer ID&lt;/li&gt;
&lt;li&gt;Revenue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dimension Tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customers&lt;/li&gt;
&lt;li&gt;Products&lt;/li&gt;
&lt;li&gt;Dates&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data Modeling Schemas
&lt;/h2&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%2Fufb5i2uoo1kiqf3z8e8e.jpg" 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%2Fufb5i2uoo1kiqf3z8e8e.jpg" alt=" " width="800" height="738"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Star Schema (Best Practice)
&lt;/h3&gt;

&lt;p&gt;Central fact table connected to dimension tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure:&lt;/strong&gt;&lt;br&gt;
Fact → Dimensions (no dimension-to-dimension links)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it’s powerful:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast&lt;/li&gt;
&lt;li&gt;Clean&lt;/li&gt;
&lt;li&gt;Easy to understand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt;&lt;br&gt;
Most business dashboards (sales, marketing, finance)&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Snowflake Schema
&lt;/h3&gt;

&lt;p&gt;Dimensions are normalized (split further).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Product → Category → Department&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduces redundancy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More complex&lt;/li&gt;
&lt;li&gt;Slower queries&lt;/li&gt;
&lt;/ul&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%2Fj0wovncxtcxd2ysfd3qp.jpg" 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%2Fj0wovncxtcxd2ysfd3qp.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Flat Table (DLAT)
&lt;/h3&gt;

&lt;p&gt;Everything in one table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redundant data&lt;/li&gt;
&lt;li&gt;Poor performance at scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt;&lt;br&gt;
Small datasets or quick prototypes&lt;/p&gt;

&lt;h2&gt;
  
  
  Role-Playing Dimensions
&lt;/h2&gt;

&lt;p&gt;A single dimension used multiple times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Date table used as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Order Date&lt;/li&gt;
&lt;li&gt;Delivery Date&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Power BI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Duplicate the Date table&lt;/li&gt;
&lt;li&gt;Create separate relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Data Modeling Mistakes
&lt;/h2&gt;

&lt;p&gt;From experience, these will mess you up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using flat tables for large datasets&lt;/li&gt;
&lt;li&gt;Too many many-to-many relationships&lt;/li&gt;
&lt;li&gt;Bi-directional filters everywhere&lt;/li&gt;
&lt;li&gt;Not using a proper Date table&lt;/li&gt;
&lt;li&gt;Mixing joins and relationships incorrectly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data modeling is not the flashy part of Power BI.&lt;/p&gt;

&lt;p&gt;But it’s the part that determines whether your analysis is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accurate&lt;/li&gt;
&lt;li&gt;Scalable&lt;/li&gt;
&lt;li&gt;Trustworthy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right now at LuxDev, I’m starting to see that this is the real shift from “using tools” to actually thinking like a data analyst&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>sql</category>
      <category>powerfuldevs</category>
      <category>datastructures</category>
    </item>
    <item>
      <title>How Excel is Used in Real World Data Analysis</title>
      <dc:creator>Shadrack Tesot</dc:creator>
      <pubDate>Fri, 27 Mar 2026 20:15:41 +0000</pubDate>
      <link>https://dev.to/tesot45/how-excel-is-used-in-real-world-data-analysis-100a</link>
      <guid>https://dev.to/tesot45/how-excel-is-used-in-real-world-data-analysis-100a</guid>
      <description>&lt;p&gt;If you had told me a year ago that Excel would become one of the most powerful tools in my journey into data, I probably would have thought of it as just a place to store numbers. Something basic. Something entry-level.&lt;/p&gt;

&lt;p&gt;I was wrong.&lt;/p&gt;

&lt;p&gt;As I’ve worked with different clients and now upskilling at LuxDev, I’ve seen Excel shift from a simple spreadsheet tool to something closer to a control center for business decisions. It’s not just about data entry. It’s about understanding what’s happening in a business and being able to act on it.&lt;/p&gt;

&lt;p&gt;Let’s break that down.&lt;/p&gt;

&lt;p&gt;At its core, Excel is a spreadsheet software used to organize, analyze, and visualize data. But that definition barely scratches the surface.&lt;/p&gt;

&lt;p&gt;In real-world use, Excel becomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A database (storing structured data)&lt;/li&gt;
&lt;li&gt;A calculator (processing numbers at scale)&lt;/li&gt;
&lt;li&gt;A reporting tool (summarizing insights)&lt;/li&gt;
&lt;li&gt;A decision-making system (guiding actions)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I was working with one of my client, we had a Google Sheets system (which works almost exactly like Excel). Orders were coming in from different channels like WhatsApp, Instagram, and the shop. Everything needed to be tracked: product type, quantity, price, status, and fulfillment.&lt;/p&gt;

&lt;p&gt;Now imagine doing that manually every day. It would be chaos.&lt;/p&gt;

&lt;p&gt;This is where Excel comes in.&lt;/p&gt;

&lt;p&gt;We structured the sheet so that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each row represented an order&lt;/li&gt;
&lt;li&gt;Columns captured key details like product, quantity, and price&lt;/li&gt;
&lt;li&gt;We used formulas to automatically calculate totals and track progress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s real-world data analysis. Not some abstract dataset. Actual business operations.&lt;/p&gt;

&lt;p&gt;Here are some of the most useful things I’ve learned and actually used.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. IF Statements (Decision Logic)
&lt;/h4&gt;

&lt;p&gt;The IF function lets you create logic inside your data.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=IF(K2&amp;gt;1000, "High Value", "Low Value")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a real scenario, this helps categorize orders. This kind of logic can quickly tell you which customers are worth prioritizing or which orders need special attention.&lt;/p&gt;

&lt;p&gt;You’re basically teaching your spreadsheet how to think.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. VLOOKUP / XLOOKUP (Finding Data Fast)
&lt;/h4&gt;

&lt;p&gt;Let’s say you have two sheets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One with order IDs&lt;/li&gt;
&lt;li&gt;Another with customer details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manually matching them, you use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=VLOOKUP(A2, Customers!A:D, 2, FALSE)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pulls customer information into your order sheet automatically.&lt;/p&gt;

&lt;p&gt;In real life, this is how you connect different parts of a business. Sales data, customer data, inventory. Everything becomes linked.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. SUMIF / COUNTIF (Targeted Analysis)
&lt;/h4&gt;

&lt;p&gt;These formulas help you answer specific questions.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=SUMIF(B:B, "Instagram", K:K)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells you total revenue from Instagram orders.&lt;/p&gt;

&lt;p&gt;Now imagine doing that across multiple channels. You can quickly see which platform is performing best. That’s not just data, that’s strategy.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Pivot Tables (Turning Raw Data into Insight)
&lt;/h4&gt;

&lt;p&gt;This is where things get powerful.&lt;/p&gt;

&lt;p&gt;A pivot table lets you take thousands of rows and summarize them instantly.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total sales by product&lt;/li&gt;
&lt;li&gt;Orders per month&lt;/li&gt;
&lt;li&gt;Revenue by channel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of scanning raw data, you get a clean summary in seconds.&lt;/p&gt;

&lt;p&gt;In my experience, this is what turns you from someone who “uses Excel” into someone who actually analyzes data.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Bigger Picture
&lt;/h3&gt;

&lt;p&gt;What I’m learning now at LuxDev is that Excel is just the starting point. Eventually, you move into tools like Python, SQL, and machine learning.&lt;/p&gt;

&lt;p&gt;But here’s the truth most people don’t say:&lt;/p&gt;

&lt;p&gt;If you can’t analyze data in Excel, you won’t magically become good at data science.&lt;/p&gt;

&lt;p&gt;Excel builds your thinking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to structure data&lt;/li&gt;
&lt;li&gt;How to ask the right questions&lt;/li&gt;
&lt;li&gt;How to turn numbers into decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Excel in the real world is not about memorizing formulas. It’s about solving problems.&lt;/p&gt;

&lt;p&gt;It helps streamline operations.&lt;br&gt;
At LuxDev, it’s forming the foundation for deeper data skills.&lt;/p&gt;

&lt;p&gt;So if you’re starting out, don’t underestimate Excel. It’s not basic. It’s fundamental.&lt;/p&gt;

&lt;p&gt;And if you use it right, it can take you a lot further than you think.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>microsoft</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
