Just a little reminder note today on the simplest way to make data-model changes in SQL Server 2005 when the database is replicated via transactional replication. This is from my own personal experience of replication and very-much muddling my way through learning how to use it effectively. Otherwise, this posts presumes you are familiar with Replication Monitor and so on.
Archive for the ‘Databases’ Category
Data Model Changes and Replication
Saturday, March 13th, 2010The Rounding Race - Rounding DateTimes to Dates at Midnight
Monday, August 31st, 2009
Yesterday I covered the implementation details of DateTime and SmallDateTime datatypes in SQL Server 2005. I approached the issue of testing dates to see if they fell on a particular date… but then stopped-short of some fairly useful (but arcane) stuff about rounding dates.
One Second to Midnight - DateTimes in Sql Server 2005
Sunday, August 30th, 2009
Today I am enthused to write about the DateTime and SmallDateTime datatypes in SQL Server 2005 (and possibly this also applies to 2008, although that has additional date and time types). I am driven to write this because I have seen a number of issues relating to their use in queries and one in particular that is a real annoyance to me - even if I have to admit that it is completely and utterly pedantic (most of the time).
Empowering Your Lookup Tables
Saturday, May 16th, 2009Recently, I’ve noticed that some developers, while fully understanding what a lookup table is for in terms of normalising data, miss opportunities to use them in additional ways. This post is therefore about those further uses for lookup tables that will really give you an opportunity to streamline your code.
The Basic Lookup Table
Wednesday, May 13th, 2009‘Lookup Tables’ are commonly created in relational data models and databases as part of the normalisation process. For example, instead of having address rows in an address table that continually repeat the words ‘HOME’ or ‘WORK’ to indicate if this is a customer’s home or work address, we might introduce an ‘AddressType’ table, with a primary key of ‘AddressTypeId’. Our AddressType table may look like this:
AddressTypeId Name
1 Home
2 Work
My DB Table / Column Naming Conventions
Friday, May 8th, 2009I recently got around to researching a topic on the internet that had intrigued me, that being the question: “Should Table Names be in the singular, or plural?” For example, should you call a table Employee… or Employees? For as long as I can remember, my impression has always veered towards the singular. I don’t believe this is because I am a programmer, concentrating on row-based operations rather than set-based (because, as much as anything else, I actually started learning SQL with Oracle as pure SQL… not in the context of learning it with a third-generation programming language).
Generating Data
Monday, April 13th, 2009I’ve worked on a couple of projects recently where the design of the underlying data-model has, I think, surprised my colleagues. In both cases, there were elements to the design where I have chosen to persist something to the database which I think they may have tried to avoid saving that information; so I wanted to jot down some reasons why it’s a good idea (in these cases anyway).