| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Eliminating Nulls
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
![]() |
![]() |