Press "Enter" to skip to content

Month: August 2025

Business Rule Automation in SQL Server Triggers

Kenneth Omorodion uses triggers:

The advantage of using triggers is that the same processing can occur regardless of where or how the data has been inserted, updated or deleted. In this article, we look at several examples of where and why triggers could be useful along with an example use case.

I’m not a huge fan of using triggers for handling business rules for a few reasons. The biggest one is that triggers get lost in the mix too easily—it’s not easy to see that a trigger exists and that it is the thing modifying data. This is probably one of the better setups I’ve seen for triggers, as it does include an audit log table and the triggers assume multiple rows rather than expecting a single row will come in.

Leave a Comment

The Importance of Running DBCC CHECKDB

Kevin Hill has some advice:

You just ran DBCC CHECKDB for the first time in a while (or maybe ever) and saw something you didn’t expect: the word corruption.

Take a breath.

Don’t detach the database.
Don’t run REPAIR_ALLOW_DATA_LOSS.
Don’t reboot the server or start restoring things just yet.

There’s a lot of bad advice floating around from old blogs, well-meaning forum posts, and even some popular current LinkedIn threads. Some of it might’ve been okay 15 years ago. Some of it is dangerous.

Let’s dig in.

Click through to dig in.

Leave a Comment

An Introduction to Query Folding in Power BI

Alex Powers takes us through one major performance optimization technique in Power BI:

One of the most powerful capabilities of Power Query and the M Language is Query Folding (also referred to as query delegation, and predicate push-down). Query Folding allows the Power Query Mashup Engine to push the transformations expressed in an M (mashup) query to the data source, in the data source’s query language, resulting in more efficient data processing.

For inexperienced database technology users this ability to leverage the graphical user interface of Power Query to dynamically generate a query written in the data source’s query language unlocks enormous opportunities to find insights with any data, at any scale.

Click through to see how you can know if query folding is enabled, as well as some hints around when and to what extent query folding will work.

Leave a Comment

SSMS 21 and the Visual Studio Installer

Randolph West clears up a few misconceptions about SQL Server Management Studio 21’s installer:

There’s been some confusion lately about the SQL Server Management Studio (SSMS) installation process for version 21.

Before Microsoft released SSMS 21, you had to download an installer file for each release (ever since SSMS was released as a standalone product with v16). This file eventually grew to be over 1GB, which is a significant download, especially in the case of a minor update.

With SSMS 21, Microsoft changed SSMS to use the Visual Studio installer. 

Read on to learn more about the ramifications of this decision. And there is still a way to install SSMS 21 in a secure environment without outbound internet access, although it does require a few more steps in addition to “download executable and then deploy executable to other machines.”

Leave a Comment

Securing PostgreSQL Containers

Mercy Bassey grabs a certificate:

Running Postgres in Docker is great for a quick test but what if you want it to behave like a proper, production-style setup with SSL encryption, certificate-based authentication, persistent volumes, and custom configurations? In this article, we’ll find out how, tackling the various tasks involved such as:

  • Generating and using self-signed SSL certificates with Postgres.
  • Setting up a PostgreSQL Docker container that uses those certs for encrypted client connections.
  • Configuring authentication for both automated services and human users.
  • Controling the behavior of your Postgres instance using mounted config files.

Read on to see how.

Leave a Comment

TerraForm Commands in Visual Studio Code

Josephine Bush deploys some resources:

I realized I never created a post to show how to deploy Terraform from VS Code. I haven’t done that in a while because I don’t do it at work. We have Azure DevOps pipelines to handle that, but I like to test my code on the side in my personal environment because I don’t have a pipeline set up to push the code. I don’t need a pipeline in my personal environment.

Now, I feel rusty on Terraform commands and how to run them from VS Code, so I’m writing this blog post so my future self can thank me. I could look it up on someone else’s website or ask an AI, but I would rather document this for myself.

Click through for a primer on those commands.

Leave a Comment

Diving into Hash Tables

Hugo Kornelis dives into the arcane:

But what you probably don’t know is how that hash table is structured. How is the data stored? Where are new rows added, how is the table accessed?

To be fair, none of this is useful knowledge, unless you work for the engine team at Microsoft. And if you do, then you have access to source code and documentation, so you won’t need me to explain this structure to you. So why do I even take the trouble to investigate and describe this structure? Because I am a geek, and geeks love to dig into technical stuff and uncover things they were never meant to uncover.

“Because I can” is a perfectly valid reason to dig into a topic.

Leave a Comment

Kafka: From ZooKeeper to KRaft

Phil Yang lays out how to make a migration:

Apache Kafka has made a landmark shift in KIP-500 with the introduction of Kafka Raft (KRaft) mode, eliminating the dependency on Apache ZooKeeper for metadata management. With KRaft, the Kafka nodes themselves can be configured as KRaft controllers – which allow for metadata management and leader elections to work all within just Kafka, resulting in significant performance improvements. This cemented KRaft’s status as the metadata management protocol for Kafka moving forward.

This blog will guide you through the importance of this transition, what migrating from ZooKeeper to KRaft entails, and how we, at NetApp Instaclustr, make this seamless with our automated, streamlined process that is built into our platform.

Click through to see how you can update your own clusters, whether you’re using the Instaclustr service or not.

Leave a Comment

Text Classification with Decision Trees

Ivan Palomares Carrascosa takes us through a simple natural language processing problem and solution:

It’s no secret that decision tree-based models excel at a wide range of classification and regression tasks, often based on structured, tabular data. However, when combined with the right tools, decision trees also become powerful predictive tools for unstructured data, such as text or images, and even time series data.

This article demonstrates how to build decision trees for text data. Specifically, we will incorporate text representation techniques like TF-IDF and embeddings in decision trees trained for spam email classification, evaluating their performance and comparing the results with another text classification model — all with the aid of Python’s Scikit-learn library.

Read on for the demos and to see how three different approaches work.

Leave a Comment