[dba-SQLServer] NULLs

Francisco Tapia fhtapia at gmail.com
Mon Mar 16 13:36:10 CDT 2009


Depending on the level of normalization you'd have the name table and a
junction table in between it and the titles table to read something like
NameTable
NameID
FirstName
LastName

TitleTable
TitleID
TitleValue

NameTitleJunct Table
NameID
TitleID

In this scenario you would not have a null.... (and yes I am totaly playing
devi's advocate as I use Nulls in my designs)
-Francisco
http://sqlthis.blogspot.com | Tsql and More...


On Mon, Mar 16, 2009 at 11:19 AM, Robert <Robert at webedb.com> wrote:

>
>                A foreign key as a null is fine.
>
> For example if I have a Name table and a Name Suffix table.
> Not every one has a name suffix of Jr., Sr. II, III, etc. so in
> the Name table, that value would be null.
>
> Or did I miss something?
>
> Robert
>
> ----------------------------------------
>
>                                From:
> dba-sqlserver-request at databaseadvisors.com
> Sent: Monday, March 16, 2009 2:01 PM
> To: dba-sqlserver at databaseadvisors.com
>  Date: Mon, 16 Mar 2009 13:51:55 -0400
> From: "Susan Harkins"
> Subject: Re: [dba-SQLServer] NULLs
> To: "Discussion concerning MS SQL Server"
>
> Message-ID: <622CF91D365242B78840F3E3D618799B at SusanOne>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> I'm more than confused and Gustav, if you can admit it, I can too!
>
> A FK is just a primary key in a related table, so how can it be null to
> begin with? I can see the record not having a match in the related table...
> if that's what you mean.
>
> Susan H.
>
> > Hi Dan
> >
> > I think you - or someone else? - are contradicting yourself or someone
> > else(?) - at least "me am totalyful confusticated" now!
>
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>



More information about the dba-SQLServer mailing list