SQL 103

This is my SQL architecture and design course. In this series you’ll get an idea of what kind of objects you can build, and what they’re used for. Once you have these basics, you can move on to learning the performance implications of each of these object types.

As I add articles to this series, they’ll appear below.

  • SQL103 - Designing Triggers Posted on: 20111017
      We’ve finally made it to the last post in the SQL103 series.  I’ve written posts about triggers before.  I’ve shared with you how triggers can be good things and bad things.  It’s all in how you design them.  Today, I hope to teach you how you can design good triggers.  Let’s dive right in! [...]
  • SQL 103-Designing Stored Procedures Posted on: 20111014
      We’re nearing the end of the SQL103 series. We’ve designed tables, relationships, indexes and views. There’s plenty more to learn. Today we’re going to discuss designing stored procedures. When you start designing stored procedures you’re generally trying to build a wrapper around a collection of T-SQL statements that you can then hand off to [...]
  • SQL103 - Designing Indexes Posted on: 20111012
      So you’ve designed your tables, then you set up your primary and foreign keys.  You even defined views that your programmers will use to present the data to end users.  What’s next?  Well, if you want to take a proactive approach to database design, you’re going to want to start thinking about indexing. Initial [...]
  • SQL103 - Designing Views Posted on: 20111010
      One of the next steps, after designing your tables is designing your views.  You’ll often need to create them so that programmers will have access to the data in several tables, but you want to provide them an easier way to pull out the data.  It’s a lot easier for them to use: SELECT [...]
  • SQL103 - Prevent Dirty Data Posted on: 20111007
      Now that we’ve built relationships between our tables, we want to take the next step with our design is making sure the data stored in our tables is as clean as possible.  The tool you’ll use for this insurance, is called a constraint. The good news is you’ve already learned one type of constraint.You’ve [...]
  • SQL 103 - Relating Your Tables Posted on: 20111005
      Last time we were discussing how to build normalized tables.  We designed 3 tables: Customer, Address and PhoneNumber.  The Address and PhoneNumber tables are related to the Customer table, but how do we relate two tables?   Primary Keys When we talk about relating one table to another, we’re really talking about relating a [...]
  • SQL 103 - Normalized Table Design Posted on: 20111003
      So last time we were discussing the difference between normalized and de-normalized database design.  We also discussed our case study, the CRM company.  We decided to begin our database design by designing normalized tables to track customers and contacts with those customers. Let’s continue with that case today.  We want to build tables to [...]
  • SQL 103 – Introduction to Database Design and Architecture Posted on: 20110929
      I’m starting a new blog series to accompany the session I’m presenting at SQL Saturday #87 in Louisville! This session will cover the basics of designing a database from a developer’s point of view. During the class I’ll only have an hour, but in these blog posts I’ll be able to dig in a [...]
  • SQL103 - Normalized or Denormalized Design Posted on: 20110929
      When you begin designing a database, you start with the tables. You can’t very well start with views or stored procedures, right? What tables would they reference? When you begin designing tables, one of the first calls you’ll have to make is are you going to build a set of normalized tables or denormalized [...]