Eliminating Nulls
From: <wbarthol_at_gmail.com>
Date: 1 Jul 2005 02:42:34 -0700
Message-ID: <1120210954.263937.249930_at_g47g2000cwa.googlegroups.com>
I know a number of database modelers try to avoid NULLs in their models because of their "unpredictability" and I believe there is merit in this approach. Is the ideal way to do this to move the optional attribute into it's own table? For example:
Date: 1 Jul 2005 02:42:34 -0700
Message-ID: <1120210954.263937.249930_at_g47g2000cwa.googlegroups.com>
I know a number of database modelers try to avoid NULLs in their models because of their "unpredictability" and I believe there is merit in this approach. Is the ideal way to do this to move the optional attribute into it's own table? For example:
CREATE TABLE dbo.UseCases
(
UseCaseNumber int NOT NULL PRIMARY KEY,
UseCaseName nvarchar(50) NOT NULL UNIQUE,
GoalInContext nvarchar(500) NULL
)
Should become:
CREATE TABLE dbo.UseCases
(
UseCaseNumber int NOT NULL PRIMARY KEY,
UseCaseName nvarchar(50) NOT NULL UNIQUE
)
CREATE TABLE dbo.UseCaseGoals
(
UseCaseNumber int NOT NULL PRIMARY KEY REFERENCES dbo.UseCases(
UseCaseNumber ),
GoalInContext nvarchar(500) NOT NULL
)
Received on Fri Jul 01 2005 - 11:42:34 CEST