Different behavior between table designer and properties sheet.  
Author Message
moreins





PostPosted: Fri Oct 01 16:32:50 CDT 2004 Top

SQL Server >> Different behavior between table designer and properties sheet.

When the foreign key constrain is in place, why does
table designer allow to make that field allow nulls, but
property sheet doesn't? Is there specific reason to have
them behave inconsistently?

Thanks you,
IK

SQL Server214  
 
 
David





PostPosted: Fri Oct 01 16:32:50 CDT 2004 Top

SQL Server >> Different behavior between table designer and properties sheet. I'm not certain which properties sheet you are referring to but most people
take it for granted that Enterprise Manager has a number of slightly quirky
features. In common with many others, I tend to avoid using EM and make
schema changes in TSQL code.

--
David Portas
SQL Server MVP
--


 
 
IK





PostPosted: Mon Oct 04 08:18:18 CDT 2004 Top

SQL Server >> Different behavior between table designer and properties sheet. Hi David,

In EM, "Table Properties" screen is shown by double click
on table or right-click/Properties. "Design Table" -
right-click/Design Table. As for me, it is a flaw in EM
Design Table feature to allow nulls for the field with
foreign key constraint, thus allowing orphan records in a
child table.

Best Regards,
IK

>-----Original Message-----
>I'm not certain which properties sheet you are referring
to but most people
>take it for granted that Enterprise Manager has a number
of slightly quirky
>features. In common with many others, I tend to avoid
using EM and make
>schema changes in TSQL code.
>
>--
>David Portas
>SQL Server MVP
>--
>
>
>.
>
 
 
David





PostPosted: Tue Oct 05 01:03:43 CDT 2004 Top

SQL Server >> Different behavior between table designer and properties sheet. > As for me, it is a flaw in EM
> Design Table feature to allow nulls for the field with
> foreign key constraint, thus allowing orphan records in a
> child table.

No, that feature is by design. In ANSI/ISO Standard SQL, all columns can be
nullable except Primary Keys. That includes Foreign Keys. You can decide
either to allow or disallow NULLs depending on your requirements.

--
David Portas
SQL Server MVP
--


 
 
anonymous





PostPosted: Tue Oct 05 09:29:43 CDT 2004 Top

SQL Server >> Different behavior between table designer and properties sheet. That explained a lot, thank you. And I wish EM would be
more consistent in enforcing those standards across all
its features.

Best Regards,
IK

>-----Original Message-----
>> As for me, it is a flaw in EM
>> Design Table feature to allow nulls for the field with
>> foreign key constraint, thus allowing orphan records
in a
>> child table.
>
>No, that feature is by design. In ANSI/ISO Standard SQL,
all columns can be
>nullable except Primary Keys. That includes Foreign
Keys. You can decide
>either to allow or disallow NULLs depending on your
requirements.
>
>--
>David Portas
>SQL Server MVP
>--
>
>
>.
>