SQL Order By Cheat Sheet

This is a cheat sheet that I have put together for keeping track of the results of ordering different types of columns in ASC and DESC order and the rules around each.  This order is fairly standard for most ANSI database servers.  However I do not believe that there is anything in the ANSI spec that dictates this as a requirement.

Continue reading SQL Order By Cheat Sheet

The Real Key to Finding a Home

Everyone says that real estate is all about location, location, location.  And I agree completely! But the real reasoning is a little different than you might think. I live on a little road called Ridge rd. Does not seem like there should be anything wrong with that, until you have to give that address to a deliver person.

Continue reading The Real Key to Finding a Home

Python virtualenv and crontab

I created a small simple bot in python to download the updated GeoNames daily updated files to be processed by the database.  These files are generated each day and remove the need to load a full 2GB dataset into the database to keep the database updated.

Continue reading Python virtualenv and crontab

Rounding

Rounding is the representation of a number in a shorter, simpler or more explicit way. Its intended purpose is to replace any number with a shorter representation of it. It is important to remember that you are manipulating that number and what that manipulated representation is meant to convey. The root of the issue is simple. When you round a number, you are changing the number.

Continue reading Rounding

MySQL INSERT IGNORE

INSERT IGNORE is used in our organization to insert new records and ignore records that have the same primary key.  This ignores the duplicate key exception that is generated and simply throws away the record.  This allows for inserting those records to not make without having to employ a LEFT JOIN to avoid the duplication. Continue reading MySQL INSERT IGNORE

Using JOIN for Suppression

We usually use JOIN to find the intersection between two different tables.  For example, if you want all the orders from the order table who belong to a certain set of customers from the customer table.

This is the most common usage of a JOIN, specifically an INNER JOIN.  The results only include the entries that matchup from each table.  There are many other situations that you can incorporate a JOIN to solve.  Particularly here we are going to talk about using a JOIN to suppress information from one table by using another. Continue reading Using JOIN for Suppression

Amtrak Trip to Freeport ME : Part 2 – The Trip

The trip finally was able to happen after all the planning from Part 1.  On Saturday April 26th, 2014 Dad, Debora and I were able to drive into Boston to take the Downeaster Amtrak train from North Station in Boston to Freeport ME.
Continue reading Amtrak Trip to Freeport ME : Part 2 – The Trip

Amtrak Trip To Freeport ME : Part 1 – The Plan

The Downeaster Amtrak train has service from North Station in Boston all the way to Brunswick Maine!  I was able to talk my wife, Debora, and my father in to a train ride up to Freeport Maine for a day of shopping and eating (it was the eating that talked Debora into it!) Continue reading Amtrak Trip To Freeport ME : Part 1 – The Plan