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

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

Re: Eliminating Nulls

From: John <no_at_email>
Date: Fri, 01 Jul 2005 12:41:20 +0100
Message-ID: <42c52c58$0$10480$da0feed9@news.zen.co.uk>


wbarthol_at_gmail.com wrote:
> 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
> )
>

That's exactly what I do, and it works for me.

John Received on Fri Jul 01 2005 - 06:41:20 CDT

Original text of this message

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