Tag Archives: Design

T-SQL Tuesday #72 – Data Modelling Gone Wrong

This is the 72nd (72? Nearly 6 years…) T-SQL Tuesday, started by Adam Machanic. Each month, someone sets a topic – this month, Mickey Stuewe (Blog|@SQLMickey) has set the topic “Data Modelling Gone Wrong”. I noticed this rather too late … Continue reading

Posted in SQLServerPedia Syndication, T-SQL Tuesday | Tagged , | 2 Comments

Disaster Prevention by Triggers

In my previous post, I discussed recovery from a situation where a user had updated every row of a table rather than the one that he was aiming at. At the end of that post, I suggested that a way … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , | Leave a comment

Unmitigated Disaster? Or was it also a Learning Experience?

The Situation You get a call. Someone has done something bad – in this case, failed to select the WHERE clause when running an UPDATE statement against your production database. Oops. Leaving aside thoughts of “why is he messing with … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , , , | 1 Comment

Denali feature: Sequences

SEQUENCES in SQL Server Denali are an improvement over IDENTITY fields in previous versions of SQL Server.  They can, for example: be used as a single incrementing ID across multiple tables be set to recycle be more easily queried However, … Continue reading

Posted in SQLServerPedia Syndication | Tagged , , | Leave a comment

Meme Monday – August 2011 – “Crappy Code”

This month’s Meme Monday, as run by Thomas “SQL Rockstar” LaRock (blog|twitter) is an exercise in writing about the worst pieces of code we have seen. Once upon a time… …I noticed that, what should have been a relatively simple … Continue reading

Posted in Meme Monday, SQLServerPedia Syndication | Tagged , | Leave a comment

Database Design Horrors

Jen McCown, of the MidnightDBA (twitter / blog) recently posted a couple of articles about the basics of Database Design.  As she was writing the second of these posts, she put out a Tweet (well, two tweets) saying: Help me … Continue reading

Posted in SQLServerPedia Syndication, Uncategorized | Tagged , , | 13 Comments

Inappropriate Indexes, and Programming Your Way Around Them

(This article should probably be called “Inappropriate Primary Keys…”, but that wouldn’t have the assonance…) Seeing various questions on AskSSC about using GUIDs as indexes, including GUIDs which are actually stored in Varchar(255) fields, reminded me of this little vignette … Continue reading

Posted in SQLServerPedia Syndication, Uncategorized | Tagged , , , | Leave a comment