Things that will make me come after you with a BIG stick: Part 1

time to read 1 min | 147 words

For some reason, I get to see a lot of WTF?! in the field, and I think that this is about time that I do something about it. I'm going to start a series of posts about the stragest stuff that I see.

Today, we have the New Data Model to observe. As you hopefully know, there are three (and only three) ways to create associations in the database, one to many, many to one and (using an association table) many to many. Trying to invent new ones will cause pain.

Take for example this table diagram:

(Image from clipboard).png

It may not seem bad to you until you dig a bit deeper and realize that both Items.Id and Items_Security.ItemId are primary keys, and both are Identity Columns!