Budget Database for Fun, Part 2

Here is a short continuation of my previous post on a “budget app” database structure. Based on my desired features from the last post, I’ve got some views for displaying net worth and one for displaying the categories with the budgets. /*Ths is simply the current net worth. Not so useful*/ CREATE OR ALTER VIEW dbo.NetWorthDisplay AS SELECT IIF( GROUPING( AD.AccountTypeGroup ) = 1, 'Net Worth', AD.AccountTypeGroup ) AS AccountTypeGroup, SUM( AD....

October 1, 2022

Budget Database for Fun, Part 1

I thought I’d have some fun and design a database to mimic the structure of the budgeting app I currently use, Bluecoin. Obviously it will be simplified, and I’m not going to actually use it, but I thought I would enjoy the exercise. A bit like seeing how many pull-ups you can do, just for the sake of it. One thing that has popped up a few times when using this app is the synchronising between devices....

August 27, 2022

Exams and Recent Work

The two most exciting things to happen are that (a) I passed my Grade 4 AMEB Cello exam a few weeks ago, and (b) I passed my TOGAF 9.2 certification exam the other day. The Azure and Architecture Certifications project page has been updated with my new badge. The cello exam certainly ended up being a bit stressful. First of all, my teacher of 2 years has developed a shoulder injury and could no longer teach from November, so I had to find someone new....

July 2, 2022

Five SQL Optimisation Techniques

I do enough MS SQL Server work every day that I thought it was worth spending a little bit of time writing about five optimisation techniques that I think about every time I need to work on a query. Very often I see code that doesn’t consider these issues and it can make a huge difference to the runtime of a stored procedure, the memory/CPU usage, and even the time it takes you to test things....

June 6, 2022

Temporary Table Name Conflict

This was an error I encounted the other week at work and I thought it worth sharing as it’s a bit of a gotcha. You normally expect that temp tables are fine to share names across sessions since they are designed to be temporary. However, there are a few times when conflicts can occur. See this post on MSSQL Tips for more details. Basically, if we don’t do any of the things that disallow caching, then trying to re-use a temp table name in a “inner” called stored procedure will cause a conflict....

March 19, 2022