Author: Ben Taylor

Editorials

Calculated Columns

Today I wanted to demonstrate one way to create calculated columns in a SQL Server table. A Calculated column is a column where the data is not entered by a system. Instead, the value is derived by some formula or function available to the database. A calculated column may be persisted or not. You would persist a calculated column if […]

Editorials

ADO.Net Interface Example

I recently wrote about using interfaces when working with ADO.Net. I received a comment requesting an example. So, today I am going to do something a little different and provide a little simple application to demonstrate how one could declare interfaces, and instantiate objects. There are a few ways you could do the instantiation. Injection is a popular method, allowing […]

Editorials

Running Code In Your Database

Why would you roll your own database adapter instead of using third party ORM tools? Today I’m going to share an example. Sometimes, because of the way data is stored in a database, it is easier to work with the data using SQL techniques, or maybe more efficient, than trying to do the same work in another layer. This is […]

Editorials

Use ADO.Net Interfaces

In the last few months I have been using ADO to work with many different database engines (MySql, SqLite, SQL Server, Oracle and DB2). I have a basic framework I put together allowing me to easily construct and bundle one or more queries into a Unit of Work so that all of the queries are included in a single transaction. […]

Editorials

ADO Basics

Today I wanted to write about good practices when working with ADO.Net. To begin with, it is important to correctly dispose of your ADO objects, as it can have a big impact on the performance against your precious database resources. There are plenty of articles and blogs on this topic to be found on the internet. So, today I just […]

Editorials

DB2 and the ADO OleDbClient

Today I had the pleasure of working with DB2. I was trying to do something that is quite simple with SQL Server. I wanted to use a transaction at the ADO level, using the OleDbTransaction object. I also wanted to protect from SQL Injection. So, even though I was not using stored procedures, I wanted to use parameters to supply […]

Editorials

Micro Service Composition

How granular should your MicroServices be? That’s a loaded question. It’s probably best to start with a definition of a MicroService, and expand from there. In short, a MicroService is a style of building software where different components are broken down into autonomous packages communicating over a network. Robert Fowler says, “In short, the microservice architectural style is an approach […]

Editorials

Time Aware

We have a holiday weekend coming up for us here in the USA. That gave me an idea for a topic we don’t talk about a lot. Many times our database applications have a requirement to  be aware of the calendar. We need to know such things as standard business days, holidays, vacation days, shipping days. Ultimately, our database systems […]

Editorials

Decoupling, Is it Worth It?

Loose Coupling, Late Binding, Dependency Injection, along with other software development techniques are all methods intended to make your code more future proof. Why should you care? It makes writing software more complicated, even with the available set of tools and frameworks. So, why should I put myself through the pain? This is an excellent question young grasshopper (revert back […]

Editorials

The Power of Group By

The GROUP BY clause has some powerful capabilities. Most of us know that it allows and performs aggregate functions for each unique group returned from the GROUP BY definition. You can do things like Average, Min, Max, Count, or even write your own CLR aggregate function. I like to use my own Median CRS aggregate function for example. However, the […]