Geek Logbook

Tech sea log book

Understanding Slowly Changing Dimensions (SCD) in Data Warehousing

When dealing with data warehouses, handling changes in dimension data over time is crucial. Unlike operational databases where updates are straightforward, data warehouses require preserving historical data for accurate analysis. This is where Slowly Changing Dimensions (SCDs) come into play. What are Slowly Changing Dimensions (SCD)? SCDs are a technique in data warehousing used to

Modes and Examples of KPIs in Data Analysis Expressions (DAX)

Last Year Comparison When analyzing sales performance, it is often useful to compare the current year’s sales with the same period in the previous year. To do this, we create several calculated measures: DAX expressions to calculate similar measures for Units instead of Revenue: Year-to-Date (YTD) Comparison Year-to-date (YTD) measures track performance from the beginning

Understanding Surrogate Keys in Databases

When designing relational databases, one crucial decision is how to uniquely identify each record in a table. This is where surrogate keys come into play. Unlike natural keys, which derive from existing attributes in the data, surrogate keys are system-generated identifiers, typically using numeric sequences or UUIDs. What is a Surrogate Key? A surrogate key

Understanding Pagination vs. Batch Processing in Data Handling

When working with large datasets, developers often face the challenge of efficiently extracting, processing, and managing data. Two commonly used techniques for handling such data efficiently are pagination and batch processing. While both methods aim to optimize memory usage and performance, they serve different purposes and are implemented differently. What is Pagination? Pagination is a

Handling Null Values in Data: Algorithms and Strategies

Null values are a common challenge in data analysis and machine learning. Dealing with them effectively is essential to ensure the reliability of your insights and models. In this post, we’ll explore various strategies and algorithms to handle null values, ranging from simple techniques to advanced methods. 1. Removing Null Values This is the simplest

Adding Custom Columns to Your Date Table in Power BI

Introduction A Date Table is an integral part of building robust and insightful Power BI reports. While a basic Date Table allows for time-based filtering and analysis, custom columns can add even more depth and flexibility. This blog post will guide you through adding custom columns to your Date Table using DAX. 1. Why Add

Counting Word Frequency in a SQL Column

Sometimes, you may need to analyze text data stored in a database, such as counting the frequency of words in a text column. This blog post demonstrates how to achieve this in SQL using a practical example. Problem Overview Let’s assume you have a table named feedback with a column comentarios that contains text data.

Are Indexes a Good Strategy for Analytical Databases?

Indexes are a well-known optimization technique in database management, often associated with improving query performance. However, whether they are a good strategy for analytical databases depends on the specific use case and database architecture. Let’s delve into the topic to understand where indexes shine and where they may fall short in analytical workloads. Indexes: Designed

Understanding the Evolution of Data Warehousing: From Codd’s Relational Model to Modern Data Warehouses

Data management has undergone significant transformations since the advent of the relational model by Edgar F. Codd. Today, data warehouses stand as a cornerstone of modern data analytics. This blog post explores the differences between Codd’s relational model and data warehouses, highlighting their unique roles and applications in data management. The Relational Model: A Brief

Creating Dynamic Dates in Excel: A Practical Guide

When working with Excel, you may encounter situations where you need to dynamically generate a date using the current year, a specific month, and a day. This post will guide you through creating such dates effectively using Excel formulas. The Challenge: Generating a Dynamic Date Suppose you want to dynamically generate a date representing November