SQL Server Infernals - Circle 4: Anarchic Designers

Constraints are sometimes annoying in real life, but no society can exist without rules and regulations. The same concept is found in Database Design: no good data can exist without constraints. What they say in Heaven Constraints define what is acceptable in the database and what does not comply with business rules. In Heaven, where the perfect database runs smoothly, no constraint is overlooked and all the data obeys to the rules of angels: Every column accepts only the data it was meant for, using the appropriate data type Every column that requires a value has a NOT NULL constraint Every column that references a key in a different table has a FOREIGN KEY constraint Every column that must comply with a business rule has a CHECK constraint Every column that must be populated with a predefined value has a DEFAULT constraint Every table has a PRIMARY KEY constraint Every group of columns that does not accept duplicate values has a UNIQUE constraint Chaos belongs to hell OK: Heaven is Heaven, but what about hell? [Read More]

Announcing SQL Server Infernals

Today I’m starting a new blog series called “SQL Server Infernals”. Throughout this series, I will take your hand and walk you through the hell of SQL Server Worst Practices, as Virgil did with Dante in his Commedia. You may ask why you should care about worst practices, when you have loads of great sources for Best Practices. The answer is that they are not enough. There are too many Best Practices: how are you supposed to know all of them? [Read More]

My first year in blogging

WordPress.com prepared a 2011 annual report for this blog and I want to share it with you. Here’s an excerpt: A San Francisco cable car holds 60 people. This blog was viewed about 2,900 times in 2011. If it were a cable car, it would take about 48 trips to carry that many people. Click here to see the complete report. This is my first year as a blogger and I’m very happy with it. [Read More]