<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Giridhar Sharma on Medium]]></title>
        <description><![CDATA[Stories by Giridhar Sharma on Medium]]></description>
        <link>https://medium.com/@giridharSharma?source=rss-257066307a16------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rkXJRmH8b1rbK5tmyf65Og.jpeg</url>
            <title>Stories by Giridhar Sharma on Medium</title>
            <link>https://medium.com/@giridharSharma?source=rss-257066307a16------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 12:06:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@giridharSharma/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Comparative Analysis of One Big Table, Kimball, and Relational Data Modelling Techniques]]></title>
            <link>https://medium.com/@giridharSharma/comparative-analysis-of-one-big-table-kimball-and-relational-data-modelling-techniques-f0d1a7f6e36f?source=rss-257066307a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0d1a7f6e36f</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[kimball]]></category>
            <category><![CDATA[3nf]]></category>
            <category><![CDATA[data-normalization]]></category>
            <dc:creator><![CDATA[Giridhar Sharma]]></dc:creator>
            <pubDate>Sat, 15 Feb 2025 10:40:25 GMT</pubDate>
            <atom:updated>2025-02-15T10:40:25.531Z</atom:updated>
            <content:encoded><![CDATA[<p>Data modelling is a crucial aspect of database design and data management. Different modelling techniques have been developed to optimize performance, maintainability, and analytical capabilities based on business requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R87_wNVOyRcDZX9XK5Jf6w.png" /></figure><p>This article compares and analyses three widely used data modelling approaches: One Big Table (OBT), Kimball’s Dimensional Modelling, and Relational (3NF) Data Modelling. We explore their architectures, advantages, disadvantages, and use cases, supported by examples and references to industry best practices.</p><p><strong>Introduction</strong></p><p>Data modelling serves as the foundation for database design, determining how data is structured, stored, and queried. Choosing the right modelling technique is essential for ensuring data integrity, optimizing performance, and facilitating analytics. This article examines three prominent data modelling approaches:</p><p>1. One Big Table (OBT) — A denormalized approach that consolidates all data into a single table.</p><p>2. Kimball’s Dimensional Modelling — A star or snowflake schema-based model optimized for analytical queries.</p><p>3. Relational (3NF) Modelling — A normalized model that reduces redundancy and enforces data integrity.</p><p>Each approach has distinct trade-offs in terms of performance, maintainability, scalability, and analytical efficiency.</p><p>Lets get the comparison out of the way for those who are not interested in going through the entire article and want gist of it:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FS9Q5a%2F1%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FS9Q5a%2F1%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FS9Q5a%2Fplain-s.png%3Fv%3D1&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="388" frameborder="0" scrolling="no"><a href="https://medium.com/media/e99d19887d12912e83312b1b8bcc6791/href">https://medium.com/media/e99d19887d12912e83312b1b8bcc6791/href</a></iframe><h3>1. <strong>One Big Table (OBT) Model</strong></h3><p>Overview</p><p>One Big Table (OBT) is a fully denormalized data model where all relevant data is stored in a single wide table. This approach is commonly used in big data environments and data warehouses, particularly with columnar storage databases like Google BigQuery and Amazon Redshift.</p><p><strong>Architecture</strong></p><p>• All data attributes are merged into a single, flat table.</p><p>• Joins are eliminated, improving query performance.</p><p>• Typically used in columnar storage systems, where queries can efficiently scan only the required columns.</p><p><strong>Advantages</strong></p><p>Optimized for Read Performance — Eliminates costly joins, making queries faster.</p><p>Simplicity — Easy to understand and implement.</p><p>Best for Columnar Databases — Works well with BigQuery, Redshift, and Snowflake.</p><p><strong>Disadvantages</strong></p><p>✘ Data Redundancy — Increased storage costs due to duplicated data.</p><p>✘ Difficult to Maintain — Schema changes require modifications to the entire table.</p><p>✘ Limited Flexibility — Not suitable for transactional applications where normalization is beneficial.</p><p><strong>Use Cases</strong></p><p>• Analytical workloads in BigQuery, Redshift, Snowflake.</p><p>• Reporting dashboards where speed is more critical than storage optimization.</p><p>• ETL pipelines where data is pre-aggregated for performance.</p><h3>2. Kimball’s Dimensional Modeling (Star Schema)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pCyaJ59p7I1DD1pB" /></figure><p>Overview</p><p>Kimball’s approach focuses on organizing data into fact and dimension tables, optimizing it for analytical processing in a data warehouse. It follows a denormalized structure while maintaining a logical relationship between entities.</p><p><strong>Architecture</strong></p><p>• Fact Tables: Contain measurable business events (e.g., sales, transactions).</p><p>• Dimension Tables: Contain descriptive attributes (e.g., customer details, product information).</p><p>• Uses Star Schema (denormalized) or Snowflake Schema (partially normalized).</p><p><strong>Advantages</strong></p><p>Optimized for Analytics — Structured for BI tools and reporting.</p><p>Improves Query Performance — Denormalized structure speeds up joins.</p><p>Scalable for Large Datasets — Commonly used in data warehouses.</p><p><strong>Disadvantages</strong></p><p>✘ Requires ETL Processing — Data needs to be transformed before loading.</p><p>✘ Less Flexible for Operational Systems — Best suited for read-heavy analytical workloads.</p><p><strong>Use Cases</strong></p><p>• Business Intelligence (BI) and Reporting (Power BI, Tableau, Looker).</p><p>• Data Warehousing Solutions (Google BigQuery, Snowflake, Redshift).</p><p>• Historical Analysis where performance is critical.</p><h3>3. Relational (3NF) Data Modeling</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*AJsApVfod9wmu_Wx" /></figure><p><strong>Overview</strong></p><p>The Relational Model, also known as Third Normal Form (3NF), organizes data into normalized tables, minimizing redundancy and ensuring referential integrity. It is widely used in OLTP (Online Transaction Processing) systems.</p><p><strong>Architecture</strong></p><p>• Data is broken into multiple tables, linked by foreign keys.</p><p>• Ensures data consistency and integrity.</p><p>• Requires JOIN operations for data retrieval.</p><p><strong>Advantages</strong></p><p>Eliminates Data Redundancy — Saves storage and improves consistency.</p><p>Ideal for OLTP Systems — Ensures data integrity and supports frequent updates.</p><p><strong>Disadvantages</strong></p><p>✘ Slower Read Performance — Joins can impact query speed.</p><p>✘ Complex Queries — Requires multiple joins for analytical reports.</p><p><strong>Use Cases</strong></p><p>• Transactional Databases (PostgreSQL, MySQL, Oracle, SQL Server).</p><p>• Enterprise Applications (CRM, ERP).</p><p>• Systems with frequent updates and strong consistency requirements.</p><p><strong>Conclusion</strong></p><p>Each data modelling approach serves different purposes. OBT is best for big data analytics, Kimball’s model is ideal for BI and reporting, while Relational (3NF) is essential for transactional systems. Choosing the right approach depends on data volume, query patterns, and business needs.</p><p>References</p><p>1. Kimball, R., &amp; Ross, M. (2013). The Data Warehouse Toolkit: The Definitive Guide to Dimensional Modeling.</p><p>2. Codd, E. F. (1970). “A Relational Model of Data for Large Shared Data Banks.” Communications of the ACM.</p><p>3. Google BigQuery Documentation: <a href="https://cloud.google.com/bigquery">https://cloud.google.com/bigquery</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0d1a7f6e36f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Problem Solving: Substring problems in Python]]></title>
            <link>https://medium.com/@giridharSharma/problem-solving-substring-problems-in-python-9f7deadee041?source=rss-257066307a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f7deadee041</guid>
            <dc:creator><![CDATA[Giridhar Sharma]]></dc:creator>
            <pubDate>Wed, 23 Aug 2023 16:55:36 GMT</pubDate>
            <atom:updated>2023-08-23T16:55:36.837Z</atom:updated>
            <content:encoded><![CDATA[<p>This article focuses on how to solve the string problems. This article outlines my learning’s. There must me multiple ways to solve the same problems, my objective is to explain my learnings in best possible way.</p><p>Problem Statement: Given a string x, find the length of the longest sub sting without repeating characters.</p><p>Initial thoughts: The problem statement is easy to understand, when we breakdown the problem we run into some scenarios</p><ol><li>The string is Null, if that is the case I expect the output to be 0.</li><li>The string is non repeating string, in such case the output will be length of the sting.</li><li>The string is repeating string, the repetition can be in multiple ways, eg: abcbcdecde output: 3 abcabcdeabc output:5</li></ol><p>For implementation, lets take the point 1. It can be solved easily by defaulting the output to be 0.</p><p>For identifying the substring, we would need two pointers. First one should point to the first character of non repeating substring and second one should be pointing to the last non repeating character of the substring.</p><p>There is also a need of a output variable that should change if the current substring is longer than previous one.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FAVcxjDtWxuRSjb7CVH%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcTE2cmFlNW1mcm0wYjhlejh1cW1wOWhnbHVianRha3gydDdqZjB2MCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FAVcxjDtWxuRSjb7CVH%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FAVcxjDtWxuRSjb7CVH%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="174" frameborder="0" scrolling="no"><a href="https://medium.com/media/79906cc1daeda931a9b427568ecc31ab/href">https://medium.com/media/79906cc1daeda931a9b427568ecc31ab/href</a></iframe><p>For the implementation, We will initiate three objects</p><ol><li>Word_Dict: This object will store each alphabet &amp; the most recent position. It will help us to check if the word is repeating</li><li>StartPoint: This pointer will help us to calculate the length of the substring</li><li>Length: This variable will contain the maximum length of the substring.</li></ol><pre>class Solution:<br>    @staticmethod<br>    def lengthOfLongestSubstring(s):<br>        if not s:<br>            return 0<br><br>        Word_Dict = {} <br>        Length = 0<br>        StartPoint = 0<br><br>        for end in range(len(s)):<br>            if s[end] in Word_Dict and StartPoint &lt;= Word_Dict[s[end]]:<br>                StartPoint = Word_Dict[s[end]] + 1<br>            else:<br>                max_length = max(max_length, end - StartPoint + 1)<br>            Word_Dict[s[end]] = end<br><br>        return max_length</pre><p>This technique can be used for other String problems as well where we need to maintain two pointers.</p><p>Thanks for reading this article. Consider giving me claps!!</p><p>अलविदा !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*oLzavHG45WbzlwdMMHBcXg@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f7deadee041" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced Python Ch.1 : Creating Packages & Sub-packages]]></title>
            <link>https://medium.com/@giridharSharma/advanced-python-ch-1-creating-packages-sub-packages-4c756904775e?source=rss-257066307a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c756904775e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-packages]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[advance-python]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Giridhar Sharma]]></dc:creator>
            <pubDate>Fri, 02 Sep 2022 07:31:05 GMT</pubDate>
            <atom:updated>2022-09-02T07:31:05.031Z</atom:updated>
            <content:encoded><![CDATA[<h3>Advanced Python Ch.1 : Creating Packages &amp; Sub-packages</h3><p>Python is used across industry for multiple use cases. With the ease that python brings to day to day automation and coding, most of these tasks can be easily maintained in a single directory in multiple modules. For other remaining use cases where the reusability of code is priority and the flow of application is complex, we need a different way to maintain the code.</p><p>For such applications, we need to package our code in Packages and sub-packages.</p><h3>Module</h3><p>First, Lets start with defining Module, Module is a any python code that can be imported into a python run time environment. Python Docs define module as “A file containing Python definitions and statements”.</p><p>Lets take an example to make it more clear by an example.</p><p>We will create a module and import it in our main python file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*WgPqi2doqjWgrPV4kk3yJg.png" /><figcaption>The Module code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*qzq4zAIm-vrKQdLtMOhHEw.png" /><figcaption>The Main Python File</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*ByH0OiXU7GnB8DAfx8TYAg.png" /><figcaption>output of the Execution</figcaption></figure><h3>Packages</h3><p>Packages are defined as modules that can contain other modules. In simple terms, the collection of modules in a directory will be termed as package. The most visible difference here is that the simple module was at <strong>file </strong>level where as the Packages are at<strong> Directory</strong> level.</p><p>To Create a package we can simply create a directory. The path of directory should be either in existing path variable or should be added to sys.path.</p><p>To qualify directory as module we will add __init__.py file in the directory. lets take an example to understand how package can be created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*sTouCOfoPS2cYUWmMqm8ew.png" /><figcaption>Directory Structure for Package</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*KwUwcFyHN0Yk9blcwAGA_g.png" /><figcaption>Sample code for module present in egPackage directory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*n2gGIPCu3dpJZRtyUUhCrA.png" /><figcaption>The Main File code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*4aCLPbnvmUtYnyooY0uYdA.png" /><figcaption>Output of the code</figcaption></figure><p>The __init__.py file can contain any code that we wish to execute one the package is imported. It is common to import the modules and submodules in this file to reduce the path user has to give to access the underlying module. We will use this functionality while discussing the submodules.</p><p><strong>Submodules</strong></p><p>For some use cases, we might want to use a subdirectory structure to organize our code. In such cases, each subdirectory will contain an __init__ file, making it a submodule contained under a umbrella directory.</p><p>Lets try to understand this using an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*WXYkKfEl7biV6YgEC54BYw.png" /><figcaption>EgPackage contains subDirectory EgSubPackage</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*Hm9hW6pM8fgp1gwJZwGA0A.png" /><figcaption>The absolute path would look like above to get factorial of a number</figcaption></figure><p>To reduce the path used to call the function, we can import the function as a part of the __init__.py file. Lets bring the function to the first module by initiating it in the __init__.py file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*d34P2lojrQyuqu1NmXBJgw.png" /><figcaption>import the function as a part of __init__.py in EgPackage Module</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*UjFQVcQCUw5fHE-PEyjCPA.png" /><figcaption>Import the package and directly use the function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*3scjQpe2p7ZN-4nDXlBElg.png" /><figcaption>Output of the code</figcaption></figure><p>As in above example, the __init__.py file helped to reduce the path and call the function with first module import.</p><p>This is all about packaging the Python code. Please look out for new articles in this series as we slowly work our way to more advanced topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c756904775e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>