Editorials

Steps to Database Design (and we need your help!)

SSWUGtv
With Stephen Wynkoop
What is a personal commitment plan, and how can you get your boss to agree to one? Laura Rose is back on the show with some helpful tips!
Watch the Show

We Need Your Help!
(…and you can win a prize!) We’re looking for your feedback in our quick survey about big data and your CIO. Please take a few minutes and let us know your thoughts – we have free memberships and other goodies in the prize drawing, and we’ll be talking about results here on the site, but we need your help!

> The survey is only open this week.
> Take the survey here – it’ll only take a few minutes.

Steps to Database Design
Today I wanted to share three basic steps I use for database design. I find that this process works well for class definitions as well.

Step One – Identify Entities

This is a task often done from use cases or subject matter experts. For each entity you identify an attribute to be used as the primary key. A system Assigned primary key may be assigned if nothing already exists in the natural makup of the entity.

Step Two – Identify Relationships

As each entity is created determine if there is a relationship between the new entity and all existing entities. For one to many relationships, add a foreign key to the existing entity. For many to many relationships, a new entity is creating allowing keys from two existing entities.

Step Three – Add Attributes

Now that you have a set of entities designed to emulate your requirements you begin to flesh out the full characteristics of the entity by adding additional columns to the table definition.

As you add new attributes be aware of those instances where you find you are creating multiple columns with the same information. This may need to be re-factored into additional entities with new relationships rather than replicating columns. A great way to know this is happening is when you find yourself adding a suffix to the column name to allow multiple items of the same type.

Share your tips on database design by writing to btaylor@sswug.org.

Cheers,

Ben

$$SWYNK$$

Featured Article(s)
Understanding DBCC CHECKDB Command to Deal with Corrupt Database
This article discusses about using about using DBCC CHECKDB command, which helps us to identify and repair corruption inside database.

Featured White Paper(s)
All-At-Once Operations
Written by Itzik Ben-Gan with SolidQ

SQL supports a concept called all-at-onc… (read more)