Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Eliminating Nulls

Eliminating Nulls

From: <wbarthol_at_gmail.com>
Date: 1 Jul 2005 02:42:34 -0700
Message-ID: <1120210954.263937.249930@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 - 04:42:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US