<?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: Feddy Mwanjumwa</title>
    <description>The latest articles on DEV Community by Feddy Mwanjumwa (@feddy_mwanjumwa_e4047cf0c).</description>
    <link>https://dev.to/feddy_mwanjumwa_e4047cf0c</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3952222%2F538fcc25-0f91-4386-8c6b-23ff856e7bf8.png</url>
      <title>DEV Community: Feddy Mwanjumwa</title>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/feddy_mwanjumwa_e4047cf0c"/>
    <language>en</language>
    <item>
      <title>From Dirty Data to Business Insights: Building the Tembo Hotel Suites Database</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Sun, 13 Sep 2026 11:52:58 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/from-dirty-data-to-business-insights-building-the-tembo-hotel-suites-database-l4k</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/from-dirty-data-to-business-insights-building-the-tembo-hotel-suites-database-l4k</guid>
      <description>&lt;h1&gt;
  
  
  From Dirty Data to Business Insights: Building the Tembo Hotel Suites Database
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As part of my data analytics journey, I worked on a practical SQL project based on a fictional hotel called &lt;strong&gt;Tembo Hotel Suites&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal was not simply to write SQL queries. I wanted to take a messy hotel booking dataset, clean it, transform it into a properly structured relational database, and finally use SQL to answer business questions.&lt;/p&gt;

&lt;p&gt;This project helped me understand how SQL fits into a real-world data analytics workflow — from raw data all the way to business insights.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The original dataset contained hotel booking information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guest details&lt;/li&gt;
&lt;li&gt;Phone numbers&lt;/li&gt;
&lt;li&gt;Room information&lt;/li&gt;
&lt;li&gt;Booking dates&lt;/li&gt;
&lt;li&gt;Staff information&lt;/li&gt;
&lt;li&gt;Salaries&lt;/li&gt;
&lt;li&gt;Payment methods&lt;/li&gt;
&lt;li&gt;Booking status&lt;/li&gt;
&lt;li&gt;Services used&lt;/li&gt;
&lt;li&gt;Guest ratings&lt;/li&gt;
&lt;li&gt;Revenue information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, the data was so messy.&lt;/p&gt;

&lt;p&gt;Some of the problems included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inconsistent capitalization&lt;/li&gt;
&lt;li&gt;Extra spaces&lt;/li&gt;
&lt;li&gt;Different phone number formats&lt;/li&gt;
&lt;li&gt;Missing values&lt;/li&gt;
&lt;li&gt;Inconsistent room type names&lt;/li&gt;
&lt;li&gt;Different date formats&lt;/li&gt;
&lt;li&gt;Inconsistent payment methods&lt;/li&gt;
&lt;li&gt;Inconsistent booking statuses&lt;/li&gt;
&lt;li&gt;Numbers stored as text&lt;/li&gt;
&lt;li&gt;Inconsistent formatting of monetary values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made the dataset unsuitable for reliable analysis without cleaning it first.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4y4sbdv2resiad07my3.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4y4sbdv2resiad07my3.png" alt="The dirty dataset" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The original Tembo Hotel dataset contained inconsistent formats, missing values, and other data-quality issues.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Approach
&lt;/h2&gt;

&lt;p&gt;I divided the project into five main stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database and staging setup&lt;/li&gt;
&lt;li&gt;Data cleaning&lt;/li&gt;
&lt;li&gt;Database design&lt;/li&gt;
&lt;li&gt;Loading clean data&lt;/li&gt;
&lt;li&gt;Business analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This structure also helped me keep my SQL project organized and easier to understand.&lt;/p&gt;




&lt;h1&gt;
  
  
  1. Database and Staging Setup
&lt;/h1&gt;

&lt;p&gt;I first created a staging area where I could import the original dirty dataset without modifying the raw data directly.&lt;/p&gt;

&lt;p&gt;The main staging table was:&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eg2xnrczo8nk6akodv8.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eg2xnrczo8nk6akodv8.png" alt="staging.tembo_hotel_dirty" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The columns included information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;booking_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guest_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guest_phone&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guest_city&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guest_nationality&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;room_no&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;room_type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;room_rate_per_night&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;check_in_date&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;check_out_date&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nights_stayed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;staff_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;staff_department&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;staff_salary&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;payment_method&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;booking_status&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;total_amount&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service_used&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service_price&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guest_rating&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping the raw data in a staging table allowed me to inspect and clean the data before moving it into the final database structure.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Data Cleaning
&lt;/h1&gt;

&lt;p&gt;This was one of the most important parts of the project.&lt;/p&gt;

&lt;p&gt;I inspected each column to identify inconsistencies and potential problems.&lt;/p&gt;

&lt;p&gt;For example, guest names could contain inconsistent spacing or capitalization.&lt;/p&gt;

&lt;p&gt;Room types also contained inconsistent values, such as abbreviated versions that needed to be standardized.&lt;/p&gt;

&lt;p&gt;Phone numbers appeared in different formats, including local and international formats.&lt;/p&gt;

&lt;p&gt;Dates were another major challenge because the dataset contained different formats, including values such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;01-12-2024&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;05/05/2024&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;06-09-24&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;2023-06-12&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before performing analysis, these values needed to be standardized.&lt;/p&gt;

&lt;p&gt;I also cleaned fields such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Payment methods&lt;/li&gt;
&lt;li&gt;Booking statuses&lt;/li&gt;
&lt;li&gt;Salaries&lt;/li&gt;
&lt;li&gt;Service prices&lt;/li&gt;
&lt;li&gt;Total amounts&lt;/li&gt;
&lt;li&gt;Guest ratings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The purpose of this stage was to make the data consistent enough for reliable analysis.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn9mh09cwajs9cucpwzmq.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn9mh09cwajs9cucpwzmq.png" alt="identifying areas needing to be cleaned" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx1tjib4yg6fxnla56vux.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx1tjib4yg6fxnla56vux.png" alt="the actual cleaning" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  3. Database Design
&lt;/h1&gt;

&lt;p&gt;After cleaning the data, I moved from one large staging table to a more structured relational database.&lt;/p&gt;

&lt;p&gt;I created separate schemas for different areas of the business:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hotel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;finance&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;staffs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;services&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;staging&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I then created tables such as:&lt;/p&gt;

&lt;h3&gt;
  
  
  Guest
&lt;/h3&gt;

&lt;p&gt;Stores information about hotel guests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Room
&lt;/h3&gt;

&lt;p&gt;Stores information about rooms and room types.&lt;/p&gt;

&lt;h3&gt;
  
  
  Booking
&lt;/h3&gt;

&lt;p&gt;Stores booking information and connects guests, rooms and staff.&lt;/p&gt;

&lt;h3&gt;
  
  
  Payment
&lt;/h3&gt;

&lt;p&gt;Stores payment-related information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Staff
&lt;/h3&gt;

&lt;p&gt;Stores information about hotel employees.&lt;/p&gt;

&lt;h3&gt;
  
  
  Service
&lt;/h3&gt;

&lt;p&gt;Stores additional services offered by the hotel.&lt;/p&gt;

&lt;p&gt;This approach reduced unnecessary duplication and made the database easier to maintain and 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpsjuyjgs2f42013gslp.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpsjuyjgs2f42013gslp.png" alt="the schemas and tables" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkskd9rvt6hxe818n51m.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkskd9rvt6hxe818n51m.png" alt="the schemas and tables" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft0z1w1phqyomm6iryrxj.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft0z1w1phqyomm6iryrxj.png" alt="Inserting the data to the new tables" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgos3n121cflln4k83s2a.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgos3n121cflln4k83s2a.png" alt="1" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fstwx98gjreqhyzf939yl.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fstwx98gjreqhyzf939yl.png" alt="2" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1fbn43hs56scape646d.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1fbn43hs56scape646d.png" alt="3" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0de9qeg11uvht7rgjz2.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0de9qeg11uvht7rgjz2.png" alt="relationships" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relational structure connecting guests, bookings, rooms, staff, payments, and services.&lt;/p&gt;




&lt;h1&gt;
  
  
  4. Loading the Clean Data
&lt;/h1&gt;

&lt;p&gt;Once the database structure was ready, I inserted the cleaned information into the appropriate tables.&lt;/p&gt;

&lt;p&gt;I also performed verification queries such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SELECT *&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;COUNT(*)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Checking relationships&lt;/li&gt;
&lt;li&gt;Checking whether records were successfully inserted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allowed me to confirm that the transformation from the staging table into the final database had worked correctly.&lt;/p&gt;




&lt;h1&gt;
  
  
  5. Business Analysis
&lt;/h1&gt;

&lt;p&gt;After the database was structured, I used SQL to answer business questions.&lt;/p&gt;

&lt;p&gt;Some of the analysis included:&lt;/p&gt;

&lt;h3&gt;
  
  
  Revenue by Month
&lt;/h3&gt;

&lt;p&gt;I analyzed how hotel revenue changed across different months.&lt;/p&gt;

&lt;p&gt;This can help management identify strong and weak periods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Room Performance
&lt;/h3&gt;

&lt;p&gt;I looked at room types and their performance, including average guest ratings and booking activity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Guest Locations
&lt;/h3&gt;

&lt;p&gt;I analyzed the cities where guests were coming from.&lt;/p&gt;

&lt;p&gt;This could help the hotel understand its customer base and potentially target marketing campaigns.&lt;/p&gt;

&lt;h3&gt;
  
  
  Staff Performance
&lt;/h3&gt;

&lt;p&gt;I investigated which staff members handled the most bookings.&lt;/p&gt;

&lt;p&gt;This provides a starting point for understanding workload distribution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Department Revenue
&lt;/h3&gt;

&lt;p&gt;I also explored revenue associated with different areas of the hotel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cancellation Rate
&lt;/h3&gt;

&lt;p&gt;Cancellation rates were analyzed across room types to identify whether certain room categories experienced more cancellations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Month-over-Month Revenue
&lt;/h3&gt;

&lt;p&gt;I used SQL window functions such as &lt;code&gt;LAG()&lt;/code&gt; to compare revenue between months.&lt;/p&gt;

&lt;p&gt;This was particularly useful because it moved the project beyond basic aggregation into more advanced SQL analysis.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fanwy8rssf0vewg4yff4s.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fanwy8rssf0vewg4yff4s.png" alt="1" width="800" height="450"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3td0v255eadmas09akpl.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3td0v255eadmas09akpl.png" alt="2" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using SQL window functions to compare monthly hotel revenue.&lt;/p&gt;

&lt;h1&gt;
  
  
  What I Learned
&lt;/h1&gt;

&lt;p&gt;This project taught me that SQL is much more than writing &lt;code&gt;SELECT&lt;/code&gt; statements.&lt;/p&gt;

&lt;p&gt;I learned how important data preparation is before analysis.&lt;/p&gt;

&lt;p&gt;Some of the biggest lessons were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dirty data can produce misleading insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If dates, numbers or categories are inconsistent, the final analysis may be inaccurate.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Staging tables are useful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping the original data separate from the cleaned data makes the workflow safer and easier to troubleshoot.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Database design matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Breaking a large dataset into logical tables makes the database more organized and reduces unnecessary duplication.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL can answer real business questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Queries become much more useful when they are connected to actual decisions a business needs to make.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data analytics is a process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workflow is not simply:&lt;/p&gt;

&lt;p&gt;Data → Dashboard&lt;/p&gt;

&lt;p&gt;It is more like:&lt;/p&gt;

&lt;p&gt;Raw Data → Cleaning → Transformation → Database Design → Analysis → Insights&lt;/p&gt;

&lt;h1&gt;
  
  
  Tools I Used
&lt;/h1&gt;

&lt;p&gt;For this project, I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL — database management&lt;/li&gt;
&lt;li&gt;DBeaver — SQL development and database management&lt;/li&gt;
&lt;li&gt;SQL— data cleaning, transformation and analysis&lt;/li&gt;
&lt;li&gt;GitHub — project versioning and portfolio documentation&lt;/li&gt;
&lt;li&gt;Power BI — visualization and business intelligence&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Project Structure
&lt;/h1&gt;

&lt;p&gt;I organized the SQL project into separate files:&lt;/p&gt;

&lt;p&gt;-README.md&lt;br&gt;
-tembo_hotel_dirty.csv&lt;/p&gt;

&lt;p&gt;-01_database_and_staging_setup.sql&lt;br&gt;
-02_data_cleaning.sql&lt;br&gt;
-03_database_design.sql&lt;br&gt;
-04_loading_clean_data.sql&lt;br&gt;
-05_business_analysis.sql&lt;/p&gt;

&lt;p&gt;This structure makes it easier to follow the project from the original data through to the final analysis.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;The Tembo Hotel Suites project was a valuable part of my data analytics learning journey.&lt;/p&gt;

&lt;p&gt;Instead of working with a perfectly clean dataset, I had to deal with the kinds of problems that can appear in real-world data.&lt;/p&gt;

&lt;p&gt;The project helped me practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data cleaning&lt;/li&gt;
&lt;li&gt;SQL transformations&lt;/li&gt;
&lt;li&gt;Relational database design&lt;/li&gt;
&lt;li&gt;Primary and foreign keys&lt;/li&gt;
&lt;li&gt;Data validation&lt;/li&gt;
&lt;li&gt;Aggregations&lt;/li&gt;
&lt;li&gt;Window functions&lt;/li&gt;
&lt;li&gt;Business analysis&lt;/li&gt;
&lt;li&gt;GitHub project documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most importantly, I learned that good analysis starts with good data preparation.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4zr78kuw937xw16b98uy.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4zr78kuw937xw16b98uy.png" alt="Power BI" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Power BI dashboard used to turn the analyzed hotel data into interactive business insights.&lt;/p&gt;

&lt;p&gt;There is still a lot more I want to learn, but projects like this are helping me move from simply learning SQL syntax to using SQL to solve practical problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Repository
&lt;/h2&gt;

&lt;p&gt;The complete SQL project, including the original dirty dataset and all SQL scripts, is available on my GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/FEDDY218/TEMBO_HOTEL-SUITES-DATABASE.git" rel="noopener noreferrer"&gt;https://github.com/FEDDY218/TEMBO_HOTEL-SUITES-DATABASE.git&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;My next goal is to continue building more projects that combine &lt;strong&gt;SQL, Python, Power BI and data analytics&lt;/strong&gt; to solve real-world problems.&lt;/p&gt;

&lt;p&gt;One project at a time.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>ai</category>
      <category>database</category>
      <category>data</category>
    </item>
    <item>
      <title>Understanding Schemas, Relationships, and Data Modeling in Power BI.</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Sun, 13 Sep 2026 10:56:40 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/understanding-schemas-relationships-and-data-modeling-in-power-bi-4144</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/understanding-schemas-relationships-and-data-modeling-in-power-bi-4144</guid>
      <description>&lt;h4&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Importing data into Power BI is only the beginning of the analytics process. A dashboard is only as reliable as the data model behind it. Poorly organized tables and incorrect relationships can lead to inaccurate calculations, duplicate values, and misleading reports.&lt;/p&gt;

&lt;p&gt;One of the biggest lessons I learned while building dashboards was that data modeling is just as important as creating visualizations. In this article, I'll explain schemas, relationships, and data modeling in Power BI, and why they are important for the foundation of every successful report.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Data Modeling?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data modeling is the process of organizing tables and explaining how they relate to one another.&lt;/p&gt;

&lt;p&gt;Instead of treating each table as an independent dataset, Power BI uses relationships to combine information from multiple tables into a single  model.&lt;/p&gt;

&lt;p&gt;A good data model has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Report accuracy&lt;/li&gt;
&lt;li&gt;Dashboard performance&lt;/li&gt;
&lt;li&gt;Easier filtering&lt;/li&gt;
&lt;li&gt;Better DAX calculations&lt;/li&gt;
&lt;li&gt;Simpler report formation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Understanding Fact Tables.&lt;/strong&gt;&lt;br&gt;
A fact table stores measurable business data.&lt;br&gt;
These are the values you want to analyze, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sales&lt;/li&gt;
&lt;li&gt;Revenue&lt;/li&gt;
&lt;li&gt;Quantity Sold&lt;/li&gt;
&lt;li&gt;Profit&lt;/li&gt;
&lt;li&gt;Exam Scores&lt;/li&gt;
&lt;li&gt;Attendance Records
Fact tables usually contain many rows because they record business transactions or events.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F224k3xvao6id783ntgen.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F224k3xvao6id783ntgen.png" alt="Fact table" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Dimension Tables&lt;/strong&gt;&lt;br&gt;
Dimension tables describe the facts.&lt;br&gt;
Instead of storing measurements, they store descriptive information.&lt;br&gt;
Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Students&lt;/li&gt;
&lt;li&gt;Subjects&lt;/li&gt;
&lt;li&gt;Teachers&lt;/li&gt;
&lt;li&gt;Schools&lt;/li&gt;
&lt;li&gt;Dates&lt;/li&gt;
&lt;li&gt;Counties&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fei0tetxte2647xbi82a0.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fei0tetxte2647xbi82a0.png" alt="students dimension table" width="799" height="433"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvybaeh754pij9hry1sol.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvybaeh754pij9hry1sol.png" alt="location dimension table" width="799" height="433"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp9x513zhmt1aaxakjjxk.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp9x513zhmt1aaxakjjxk.png" alt="teachers dimension table" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dimension tables allow reports to answer questions like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which county had the highest average marks?&lt;/li&gt;
&lt;li&gt;Which teacher teaches the most students?&lt;/li&gt;
&lt;li&gt;Which subject has the highest pass rate?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What Is a Star Schema?&lt;/strong&gt;&lt;br&gt;
One of the most important data models in Power BI is the Star Schema.&lt;br&gt;
In a Star Schema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a single fact table sits at the center.&lt;/li&gt;
&lt;li&gt;Multiple dimension tables surround it.&lt;/li&gt;
&lt;li&gt;Every dimension connects directly to the fact table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The structure looks like a star, that is why its called a star schema&lt;/p&gt;

&lt;p&gt;This model provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster queries&lt;/li&gt;
&lt;li&gt;Better performance&lt;/li&gt;
&lt;li&gt;Simpler relationships&lt;/li&gt;
&lt;li&gt;Easier DAX calculations&lt;/li&gt;
&lt;li&gt;Cleaner dashboards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whenever possible, Microsoft recommends using a Star Schema for Power BI models.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filayh8yrycwrxzgxddbh.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filayh8yrycwrxzgxddbh.png" alt="star schema" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Relationships&lt;/strong&gt;&lt;br&gt;
Relationships tell Power BI how tables are connected.&lt;br&gt;
Without relationships, tables remain isolated, making it impossible to combine information correctly.&lt;/p&gt;

&lt;p&gt;Relationships are usually created using:&lt;br&gt;
Primary Keys&lt;br&gt;
Foreign Keys&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
Student_ID&lt;br&gt;
Product_ID&lt;br&gt;
Customer_ID&lt;br&gt;
Order_ID&lt;/p&gt;

&lt;p&gt;When relationships are correctly made, Power BI can filter data across multiple tables automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Relationships&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Power BI supports several relationship types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-to-Many (1:*)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the most common relationship.&lt;/p&gt;

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

&lt;p&gt;One student can have many exam results.&lt;/p&gt;

&lt;p&gt;One customer can place many orders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-to-One (1:1)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each record in one table matches exactly one record in another table.&lt;/p&gt;

&lt;p&gt;This relationship is less common.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Many-to-Many (:)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both tables contain duplicate values.&lt;/p&gt;

&lt;p&gt;Although Power BI supports many-to-many relationships, they should be used carefully because they can create ambiguity and unexpected calculations.&lt;/p&gt;

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

&lt;p&gt;While learning Power BI, I encountered several common problems:&lt;/p&gt;

&lt;p&gt;Importing tables without relationships.&lt;br&gt;
Using incorrect data types.&lt;br&gt;
Creating many-to-many relationships unnecessarily.&lt;br&gt;
Leaving duplicate values in key columns.&lt;br&gt;
Connecting dimension tables directly to each other instead of through the fact table.&lt;/p&gt;

&lt;p&gt;Correcting these issues significantly improved the accuracy of my dashboards.&lt;/p&gt;

&lt;p&gt;Best Practices&lt;/p&gt;

&lt;p&gt;When building Power BI models, consider the following recommendations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use a Star Schema whenever possible.&lt;/li&gt;
&lt;li&gt;Keep fact and dimension tables separate.&lt;/li&gt;
&lt;li&gt;Ensure key columns contain matching data types.&lt;/li&gt;
&lt;li&gt;Remove duplicate values from lookup tables.&lt;/li&gt;
&lt;li&gt;Avoid unnecessary many-to-many relationships.&lt;/li&gt;
&lt;li&gt;Give tables and columns meaningful names.&lt;/li&gt;
&lt;li&gt;Hide technical key columns that report users don't need.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Following these practices results in cleaner reports and easier maintenance.&lt;/p&gt;

&lt;p&gt;Many beginners focus only on charts and visualizations.&lt;br&gt;
However, dashboards are built on data models.&lt;/p&gt;

&lt;p&gt;A good model has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accurate calculations&lt;/li&gt;
&lt;li&gt;Reliable KPIs&lt;/li&gt;
&lt;li&gt;Better report performance&lt;/li&gt;
&lt;li&gt;Easier report maintenance&lt;/li&gt;
&lt;li&gt;Consistent business insights
Without proper modeling, even attractive dashboards can produce misleading results.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Learning schemas, relationships, and data modeling completely changed the way I do Power BI projects. I now understand that creating a dashboard is much more than dragging charts onto a canvas. The real work is usually in organizing the data correctly.&lt;br&gt;
By understanding fact tables, dimension tables, star schemas, and relationships, I can build dashboards that are accurate and easier to maintain. These skills have strengthened my Power BI foundation and prepared me for more advanced topics such as DAX optimization, snowflake schemas, and enterprise-scale data models.&lt;/p&gt;

&lt;p&gt;If you're beginning your Power BI journey, spend time learning data modeling. A strong model is the foundation of every successful dashboard.&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>datamodelling</category>
      <category>beginners</category>
      <category>ai</category>
    </item>
    <item>
      <title>Mastering SQL DDL, DML, and Data Querying by Building a School Database.</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Tue, 28 Jul 2026 14:15:44 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/mastering-sql-ddl-dml-and-data-querying-by-building-a-school-database-4gep</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/mastering-sql-ddl-dml-and-data-querying-by-building-a-school-database-4gep</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Databases are the backbone of almost every modern application, from school management systems and banking platforms to e-commerce websites and healthcare systems. While learning SQL, one of the best ways to understand how databases work is by building one from scratch.&lt;/p&gt;

&lt;p&gt;As part of my SQL learning journey, I completed a project for Greenwood Academy, a fictional secondary school in Nairobi. The objective was to design the school's database, populate it with data, and write SQL queries to retrieve useful information.&lt;/p&gt;

&lt;p&gt;This project gave me practical experience with database design, data manipulation, and querying using PostgreSQL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Objective&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The objective of the project was to build a relational database capable of storing student, subject, and examination information while practicing the core SQL concepts used in real-world database management.&lt;/p&gt;

&lt;p&gt;The project involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating a database schema&lt;/li&gt;
&lt;li&gt;Creating multiple related tables&lt;/li&gt;
&lt;li&gt;Modifying table structures&lt;/li&gt;
&lt;li&gt;Inserting records&lt;/li&gt;
&lt;li&gt;Updating existing data&lt;/li&gt;
&lt;li&gt;Deleting unwanted records&lt;/li&gt;
&lt;li&gt;Querying data using different SQL operators&lt;/li&gt;
&lt;li&gt;Using aggregate functions&lt;/li&gt;
&lt;li&gt;Applying conditional logic with CASE WHEN&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Designing the Database Structure (DDL)&lt;/strong&gt;
&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkqsopu54cngw70ghjba5.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkqsopu54cngw70ghjba5.png" alt="DDL" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Populating the Database (DML)&lt;/strong&gt;&lt;br&gt;
After creating the tables, the next step was inserting data.&lt;/p&gt;

&lt;p&gt;Sample records representing students, school subjects, and examination results were inserted into the database.&lt;/p&gt;

&lt;p&gt;I also learned how to maintain data by performing common database operations such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updating incorrect records&lt;/li&gt;
&lt;li&gt;Correcting student information&lt;/li&gt;
&lt;li&gt;Removing cancelled examination results
These tasks strengthened my understanding of SQL's Data Manipulation Language (DML).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffqgff55bpco6tfx7vysr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffqgff55bpco6tfx7vysr.png" alt="DML" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retrieving Information with SQL Queries&lt;/strong&gt;&lt;br&gt;
Once the database was populated, I explored different ways of retrieving information.&lt;/p&gt;

&lt;p&gt;Some of the queries included:&lt;/p&gt;

&lt;p&gt;Finding all students in Form 4&lt;br&gt;
Displaying only female students&lt;br&gt;
Retrieving subjects from the Sciences department&lt;br&gt;
Filtering examination results above a certain mark&lt;br&gt;
Finding students from specific cities&lt;br&gt;
Searching names using the LIKE operator&lt;/p&gt;

&lt;p&gt;I also combined multiple conditions using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AND&lt;/li&gt;
&lt;li&gt;OR&lt;/li&gt;
&lt;li&gt;BETWEEN&lt;/li&gt;
&lt;li&gt;IN&lt;/li&gt;
&lt;li&gt;NOT IN
These operators make SQL extremely powerful for filtering and analyzing data.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy16dif8p32yf1gwx6qq2.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy16dif8p32yf1gwx6qq2.png" alt="sql" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Aggregate Function&lt;/strong&gt;&lt;br&gt;
Another important concept introduced during the project was aggregate functions.&lt;/p&gt;

&lt;p&gt;I used COUNT() to answer questions such as:&lt;/p&gt;

&lt;p&gt;How many students are currently in Form 3?&lt;br&gt;
How many examination results scored 70 marks or higher?&lt;/p&gt;

&lt;p&gt;Aggregate functions help summarize large amounts of data and are commonly used in reports and dashboards.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpg8arlirg3j9l86jg7dg.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpg8arlirg3j9l86jg7dg.png" alt="agg" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applying Conditional Logic with CASE WHEN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the most interesting parts of the assignment was using the CASE WHEN statement.&lt;/p&gt;

&lt;p&gt;Instead of displaying only numerical marks, SQL was used to classify student performance into meaningful categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Distinction&lt;/li&gt;
&lt;li&gt;Merit&lt;/li&gt;
&lt;li&gt;Pass&lt;/li&gt;
&lt;li&gt;Fail&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I also categorized students as either:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Senior&lt;/li&gt;
&lt;li&gt;Junior&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;based on their class level.&lt;/p&gt;

&lt;p&gt;This demonstrated how SQL can transform raw data into information that is much easier to understand.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2u9efjskqiuhvpigbt9f.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2u9efjskqiuhvpigbt9f.png" alt="CASE" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skills I Practiced&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project strengthened my understanding of several important SQL concepts, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database Design&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;SQL DDL&lt;/li&gt;
&lt;li&gt;SQL DML&lt;/li&gt;
&lt;li&gt;Table Relationships&lt;/li&gt;
&lt;li&gt;Data Filtering&lt;/li&gt;
&lt;li&gt;Search Operators&lt;/li&gt;
&lt;li&gt;Aggregate Functions&lt;/li&gt;
&lt;li&gt;CASE WHEN Statements&lt;/li&gt;
&lt;li&gt;Data Management&lt;/li&gt;
&lt;li&gt;Query Writing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;More importantly, I gained confidence in solving practical database problems instead of only studying SQL syntax.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges I Faced&lt;/strong&gt;&lt;br&gt;
Like many beginners, I encountered several challenges while working on the project.&lt;/p&gt;

&lt;p&gt;Some of these included:&lt;/p&gt;

&lt;p&gt;Remembering the correct SQL syntax.&lt;br&gt;
Knowing when to use different filtering operators.&lt;br&gt;
Understanding how ALTER TABLE modifies existing structures.&lt;br&gt;
Writing efficient queries that returned the correct results.&lt;/p&gt;

&lt;p&gt;Although these challenges slowed me down initially, solving them helped reinforce my understanding of SQL.&lt;/p&gt;

&lt;p&gt;Key Lessons Learned&lt;/p&gt;

&lt;p&gt;This project taught me that building a database involves much more than storing data.&lt;/p&gt;

&lt;p&gt;A well designed database should make it easy to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Organize information efficiently.&lt;/li&gt;
&lt;li&gt;Maintain data accuracy.&lt;/li&gt;
&lt;li&gt;Retrieve information quickly.&lt;/li&gt;
&lt;li&gt;Support reporting and decision-making.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also learned that SQL is not just a programming language it is a tool that transforms raw data into meaningful information for businesses and organizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Building the Greenwood Academy database was an excellent exercise that reinforced the fundamentals of SQL and relational databases.&lt;/p&gt;

&lt;p&gt;From designing tables and managing records to querying data and applying conditional logic, every stage of the project reflected tasks that database professionals perform in real world environments.&lt;/p&gt;

&lt;p&gt;This experience has strengthened my confidence in SQL, and I look forward to applying these skills to more advanced projects involving database optimization, joins, stored procedures, and business intelligence tools.&lt;/p&gt;

&lt;p&gt;If you're also learning SQL, I would love to hear about the projects you're working on and the concepts you're exploring.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>sql</category>
    </item>
    <item>
      <title>Connecting Power BI to PostgreSQL using Aiven Cloud to work on a project.</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Mon, 20 Jul 2026 13:41:46 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/connecting-power-bi-to-postgresql-a-step-by-step-guide-for-beginners-4dk9</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/connecting-power-bi-to-postgresql-a-step-by-step-guide-for-beginners-4dk9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction.
&lt;/h2&gt;

&lt;p&gt;Power BI is one of the most popular tools for transforming raw data into interactive dashboards and reports. Many beginners start by importing Excel files, big organizations often store their data in relational databases such as PostgreSQL.&lt;/p&gt;

&lt;p&gt;Connecting Power BI directly to PostgreSQL allows you to analyze data from a centralized source, reduce manual data imports, and create reports that can be refreshed whenever the database changes.&lt;/p&gt;

&lt;p&gt;In this article, I'll take you through the process of connecting Power BI Desktop to a local PostgreSQL database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is PostgreSQL?&lt;/strong&gt;&lt;br&gt;
PostgreSQL is a powerful, open-source relational database management system (RDBMS). It is widely used because it is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free and open-source&lt;/li&gt;
&lt;li&gt;Reliable and secure&lt;/li&gt;
&lt;li&gt;Highly scalable&lt;/li&gt;
&lt;li&gt;Supported natively by Microsoft Power BI
Because of these features, PostgreSQL is an excellent choice for storing and managing business data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
Before connecting Power BI to PostgreSQL, I ensured I had the following installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aiven Cloud&lt;/li&gt;
&lt;li&gt;Deabever&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;Power BI Desktop&lt;/li&gt;
&lt;li&gt;A PostgreSQL database containing the tables I wanted to analyze.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data Import into Aiven (PostgreSQL)&lt;/p&gt;

&lt;p&gt;The dataset was imported into an Aiven-hosted PostgreSQL database using DBeaver. The process involved:&lt;/p&gt;

&lt;p&gt;I created a PostgreSQL service on Aiven Cloud and downloaded the SSL certificate from Aiven.I connected DBeaver to the Aiven PostgreSQL database using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host&lt;/li&gt;
&lt;li&gt;Port&lt;/li&gt;
&lt;li&gt;Database name&lt;/li&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;Password&lt;/li&gt;
&lt;li&gt;SSL certificate &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I created a table to store the JCars Logistics dataset.&lt;br&gt;
I Imported the CSV dataset into the PostgreSQL table using DBeaver's Import Data wizard.&lt;br&gt;
Lastly I verified that all records were successfully imported by querying 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58rh2s75l09o84o3kadu.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58rh2s75l09o84o3kadu.png" alt=".." width="799" height="433"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsuujun7t1jqn9yp86bcr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsuujun7t1jqn9yp86bcr.png" alt="importing csv dataset" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Open Power BI Desktop&lt;/strong&gt;&lt;br&gt;
Launch Microsoft Power BI Desktop.&lt;/p&gt;

&lt;p&gt;From the Home ribbon, select:&lt;/p&gt;

&lt;p&gt;Home → Get Data&lt;/p&gt;

&lt;p&gt;A window containing all supported data sources will appear.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftyp7795i670l46kgs5nm.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftyp7795i670l46kgs5nm.png" alt="Get Data" width="682" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Choose PostgreSQL Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the Get Data window:&lt;/p&gt;

&lt;p&gt;Search for PostgreSQL Database.&lt;br&gt;
Select it.&lt;br&gt;
Click Connect.&lt;/p&gt;

&lt;p&gt;Power BI will open the PostgreSQL connection dialog.&lt;/p&gt;

&lt;p&gt;Step 2: Choose PostgreSQL Database&lt;/p&gt;

&lt;p&gt;In the Get Data window:&lt;/p&gt;

&lt;p&gt;Search for PostgreSQL Database.&lt;br&gt;
Select it.&lt;br&gt;
Click Connect.&lt;/p&gt;

&lt;p&gt;Power BI will open the PostgreSQL connection dialog.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouloppow60bsrm0j9njr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouloppow60bsrm0j9njr.png" alt="PostgreSQL Database connector." width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Enter Your Database Details&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Provide your PostgreSQL connection information.&lt;/p&gt;

&lt;p&gt;For a local PostgreSQL server, the details are typically:&lt;/p&gt;

&lt;p&gt;An example&lt;br&gt;
Server  localhost:5432 or 127.0.0.1:5432&lt;br&gt;
Database    postgres (or your database name)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Authenticate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Power BI will ask for your PostgreSQL credentials.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frm1c0z8hpjmb2ljfttet.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frm1c0z8hpjmb2ljfttet.png" alt="Enter database details" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter :&lt;/p&gt;

&lt;p&gt;Username&lt;br&gt;
Password&lt;/p&gt;

&lt;p&gt;Then click Connect.&lt;/p&gt;

&lt;p&gt;If the credentials are correct, Power BI will establish a connection to your PostgreSQL database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Select the Tables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After connecting successfully, the Navigator window will display the available tables.&lt;/p&gt;

&lt;p&gt;Select the tables you want to import into Power BI.&lt;/p&gt;

&lt;p&gt;You can either:&lt;/p&gt;

&lt;p&gt;Load the data directly into Power BI, or&lt;br&gt;
Select Transform Data if you want to clean or modify the data first.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fis0ow59mfdd6thno3rqs.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fis0ow59mfdd6thno3rqs.png" alt="Navigator window." width="800" height="637"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Transform the Data (Optional)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you choose Transform Data, Power Query Editor opens.&lt;/p&gt;

&lt;p&gt;Power Query allows you to:&lt;/p&gt;

&lt;p&gt;Change data types&lt;br&gt;
Rename columns&lt;br&gt;
Remove duplicates&lt;br&gt;
Handle missing values&lt;br&gt;
Filter rows&lt;br&gt;
Split or merge columns&lt;/p&gt;

&lt;p&gt;Preparing the data before building reports helps improve accuracy and keeps your model organized.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnngfiw4q7aeqxth9v400.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnngfiw4q7aeqxth9v400.png" alt="." width="800" height="637"&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fveho3hjueh4eqb2uny0q.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fveho3hjueh4eqb2uny0q.png" alt=".." width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 7: Build Your Report&lt;/p&gt;

&lt;p&gt;Once the data has been loaded, you're ready to create visualizations.&lt;/p&gt;

&lt;p&gt;Power BI offers many built-in visuals, including:&lt;/p&gt;

&lt;p&gt;Bar charts&lt;br&gt;
Line charts&lt;br&gt;
Pie charts&lt;br&gt;
Tables&lt;br&gt;
KPI cards&lt;br&gt;
Maps&lt;br&gt;
Slicers&lt;/p&gt;

&lt;p&gt;These visuals help transform raw database records into meaningful insights that users can explore interactively.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiqvffxxmh7hxwnfn3s3m.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiqvffxxmh7hxwnfn3s3m.png" alt="Dashboard" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This process may come with alot of common connection issues.&lt;br&gt;
If Power BI cannot connect to PostgreSQL, check the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the PostgreSQL service running?&lt;/li&gt;
&lt;li&gt;Is the server name correct?&lt;/li&gt;
&lt;li&gt;Is the port number correct?&lt;/li&gt;
&lt;li&gt;Is the database name correct?&lt;/li&gt;
&lt;li&gt;Are the username and password correct?&lt;/li&gt;
&lt;li&gt;Has the PostgreSQL driver been installed?&lt;/li&gt;
&lt;li&gt;Is a firewall blocking the connection?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most connection problems can be resolved by checking these settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benefits of Connecting Power BI to PostgreSQL&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Using PostgreSQL as a Power BI data source offers several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralized data storage&lt;/li&gt;
&lt;li&gt;Improved data consistency&lt;/li&gt;
&lt;li&gt;Faster reporting&lt;/li&gt;
&lt;li&gt;Reduced manual imports&lt;/li&gt;
&lt;li&gt;Easier collaboration&lt;/li&gt;
&lt;li&gt;Support for scheduled refreshes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of repeatedly importing spreadsheets, reports can be built directly from the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Connecting Power BI to PostgreSQL is a valuable skill for anyone working in data analytics. It allows you to access data directly from a relational database, prepare it for analysis, and create interactive dashboards that can support informed decision making.&lt;/p&gt;

&lt;p&gt;Whether you're working on personal projects or organizational data, learning to connect Power BI to PostgreSQL is an important step toward building efficient and professional reports.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>sql</category>
      <category>database</category>
      <category>powerbi</category>
    </item>
    <item>
      <title>How Excel is used in Real World Data Analysis- How deep, intresting and useful Excel is in the Tech space.</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Sat, 06 Jun 2026 20:26:15 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/what-i-learnt-about-excel-after-a-week-of-data-science-classes-how-deep-intresting-and-useful-2ipp</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/what-i-learnt-about-excel-after-a-week-of-data-science-classes-how-deep-intresting-and-useful-2ipp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction.
&lt;/h2&gt;

&lt;p&gt;My first encounter with Microsoft Excel was about 8 years ago in primary school. At the time, I only used a few basic features such as entering data into cells. To me, Excel seemed like nothing more than a digital spreadsheet where one could write some data figures like exam results.&lt;/p&gt;

&lt;p&gt;Fast forward to 2026, and my perspective has completely changed. As I began learning Excel more seriously as part of my data analytics journey, I quickly realized that it is far more powerful than I had imagined. Beyond storing data, Excel can perform calculations, automate repetitive tasks, analyze large datasets, and help users make critical  decisions.&lt;/p&gt;

&lt;p&gt;What once looked like a simple spreadsheet application has proved itself to be a very useful tool used by students, businesses, researchers, accountants, and data analysts around the world. In this article, I share some of the key lessons and discoveries from my first week of learning Excel and how they have changed the way I view this software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Excel at a deeper level.
&lt;/h2&gt;

&lt;p&gt;One of the first things I learned was how Excel organizes information using rows, columns, and cells. This might look simple, but understanding how data is structured is important because almost every task in Excel depends on it. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Introduction to Data Cleaning.
&lt;/h2&gt;

&lt;p&gt;One thing that i found intresting to me during my first week of learning Excel was data cleaning. Before this course, I assumed that data collected from surveys, businesses, or other sources was always ready for analysis. However, I learned that raw data often contains errors, duplicates, missing values, and inconsistencies.&lt;/p&gt;

&lt;p&gt;Excel has several tools that help clean and prepare data before analysis. Tools such as Find and Replace, Remove Duplicates, Text to Columns, and filtering make it easier to identify and correct problems within a dataset.&lt;/p&gt;

&lt;p&gt;I came to understand that data cleaning is one of the most important steps in the data analysis process. Even the most advanced analysis can produce misleading results if the  data is inaccurate or poorly organized. Learning about data cleaning gave me a new appreciation for the amount of work that happens before meaningful conclusions can be made from data.&lt;/p&gt;

&lt;p&gt;I also learned how to format cells by changing fonts, colors, borders, and number formats. Proper formatting makes spreadsheets easier to read and gives them a more professional appearance.&lt;/p&gt;

&lt;h3&gt;
  
  
  My First Experience with Excel Formulas.
&lt;/h3&gt;

&lt;p&gt;The most exciting part of learning Excel was discovering formulas. Instead of performing calculations manually, Excel can calculate values automatically.&lt;/p&gt;

&lt;p&gt;Some of the first formulas I learned include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SUM() for adding values&lt;/li&gt;
&lt;li&gt;AVERAGE() for finding the mean&lt;/li&gt;
&lt;li&gt;MAX() for finding the largest value&lt;/li&gt;
&lt;li&gt;MIN() for finding the smallest value&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These functions demonstrated how Excel can save time and reduce human error when working with data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sorting and Filtering Data.
&lt;/h3&gt;

&lt;p&gt;Another feature that has the ability to sort and filter data. Sorting allows data to be arranged in ascending or descending order, while filtering helps display only the information that meets specific order&lt;/p&gt;

&lt;p&gt;For example, in a dataset containing employee records, filtering can be used to display only employees from a particular department or those with a specific marital status. This makes it much easier to work with large amounts of information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts.
&lt;/h2&gt;

&lt;p&gt;After just one week of learning Excel, I can already see how much depth the tool has beyond what I initially thought. What once felt like a simple spreadsheet application is now revealing itself as a powerful platform for working with data in a structured and efficient way.&lt;/p&gt;

&lt;p&gt;This early stage has shown me that small skills like organising data, using formulas, and cleaning datasets are the foundation of much larger concepts in data analysis. I now understand that mastering Excel is not about memorizing functions, but about learning how to think logically about data.&lt;/p&gt;

&lt;p&gt;Overall, this first week has completely changed how I view Excel. What seemed basic at first now feels like an essential skill that I will keep building on throughout my learning journey.&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%2Fywosafnxv6bbskgv2i2m.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%2Fywosafnxv6bbskgv2i2m.png" alt="Screenshot of excel data sheet with raw data that i was trying to clean" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share your journey on how you viewd excel when learning it for the first time, i would love to hear from you too!!!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What i learnt about Excel after a week of data science classes- How deep, intresting and useful Excel is in the Tech space.</title>
      <dc:creator>Feddy Mwanjumwa</dc:creator>
      <pubDate>Sat, 06 Jun 2026 20:26:14 +0000</pubDate>
      <link>https://dev.to/feddy_mwanjumwa_e4047cf0c/what-i-learnt-about-excel-after-a-week-of-data-science-classes-how-deep-intresting-and-useful-370d</link>
      <guid>https://dev.to/feddy_mwanjumwa_e4047cf0c/what-i-learnt-about-excel-after-a-week-of-data-science-classes-how-deep-intresting-and-useful-370d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction.
&lt;/h2&gt;

&lt;p&gt;My first encounter with Microsoft Excel was about 8 years ago in primary school. At the time, I only used a few basic features such as entering data into cells. To me, Excel seemed like nothing more than a digital spreadsheet where one could write some data figures like exam results.&lt;/p&gt;

&lt;p&gt;Fast forward to 2026, and my perspective has completely changed. As I began learning Excel more seriously as part of my data analytics journey, I quickly realized that it is far more powerful than I had imagined. Beyond storing data, Excel can perform calculations, automate repetitive tasks, analyze large datasets, and help users make critical  decisions.&lt;/p&gt;

&lt;p&gt;What once looked like a simple spreadsheet application has proved itself to be a very useful tool used by students, businesses, researchers, accountants, and data analysts around the world. In this article, I share some of the key lessons and discoveries from my first week of learning Excel and how they have changed the way I view this software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Excel at a deeper level.
&lt;/h2&gt;

&lt;p&gt;One of the first things I learned was how Excel organizes information using rows, columns, and cells. This might look simple, but understanding how data is structured is important because almost every task in Excel depends on it. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Introduction to Data Cleaning.
&lt;/h2&gt;

&lt;p&gt;One thing that i found intresting to me during my first week of learning Excel was data cleaning. Before this course, I assumed that data collected from surveys, businesses, or other sources was always ready for analysis. However, I learned that raw data often contains errors, duplicates, missing values, and inconsistencies.&lt;/p&gt;

&lt;p&gt;Excel has several tools that help clean and prepare data before analysis. Tools such as Find and Replace, Remove Duplicates, Text to Columns, and filtering make it easier to identify and correct problems within a dataset.&lt;/p&gt;

&lt;p&gt;I came to understand that data cleaning is one of the most important steps in the data analysis process. Even the most advanced analysis can produce misleading results if the  data is inaccurate or poorly organized. Learning about data cleaning gave me a new appreciation for the amount of work that happens before meaningful conclusions can be made from data.&lt;/p&gt;

&lt;p&gt;I also learned how to format cells by changing fonts, colors, borders, and number formats. Proper formatting makes spreadsheets easier to read and gives them a more professional appearance.&lt;/p&gt;

&lt;h3&gt;
  
  
  My First Experience with Excel Formulas.
&lt;/h3&gt;

&lt;p&gt;The most exciting part of learning Excel was discovering formulas. Instead of performing calculations manually, Excel can calculate values automatically.&lt;/p&gt;

&lt;p&gt;Some of the first formulas I learned include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SUM() for adding values&lt;/li&gt;
&lt;li&gt;AVERAGE() for finding the mean&lt;/li&gt;
&lt;li&gt;MAX() for finding the largest value&lt;/li&gt;
&lt;li&gt;MIN() for finding the smallest value&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These functions demonstrated how Excel can save time and reduce human error when working with data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sorting and Filtering Data.
&lt;/h3&gt;

&lt;p&gt;Another feature that has the ability to sort and filter data. Sorting allows data to be arranged in ascending or descending order, while filtering helps display only the information that meets specific order&lt;/p&gt;

&lt;p&gt;For example, in a dataset containing employee records, filtering can be used to display only employees from a particular department or those with a specific marital status. This makes it much easier to work with large amounts of information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts.
&lt;/h2&gt;

&lt;p&gt;After just one week of learning Excel, I can already see how much depth the tool has beyond what I initially thought. What once felt like a simple spreadsheet application is now revealing itself as a powerful platform for working with data in a structured and efficient way.&lt;/p&gt;

&lt;p&gt;This early stage has shown me that small skills like organising data, using formulas, and cleaning datasets are the foundation of much larger concepts in data analysis. I now understand that mastering Excel is not about memorizing functions, but about learning how to think logically about data.&lt;/p&gt;

&lt;p&gt;Overall, this first week has completely changed how I view Excel. What seemed basic at first now feels like an essential skill that I will keep building on throughout my learning journey.&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%2Fywosafnxv6bbskgv2i2m.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%2Fywosafnxv6bbskgv2i2m.png" alt="Screenshot of excel data sheet with raw data that i was trying to clean" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share your journey on how you viewd excel when learning it for the first time, i would love to hear from you too!!!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
