.NET: Allow NULLS in DB fields?
- by mark smith
Hi there,
I have the task of re-factoring an SQLServer DB.... A lot of the tables and columns "ALLOW NULLS", Is this good practice...
I seem to remember the authour of CSLA.NET saying it was really bad practice to allow nulls in a DB...
If this is the case, what are my alternatives?
Remove all "ALLOW NULLS" from all columns.... and in numeric columns use a value of -1 for example??
I would really appreciate any input anyone has.
I am currently using a Model (from entity framework) from my DB and the db columns that "ALLOW NULLS" are null ... and some of the stored procedures require that i have a default value... i.e. BOOLEAN require FALSE as default ... but it is null..
Well i don't want to stray from my original question, ALLOW NULLS are a bad thing from what i can gather .... so how do i fix this ?
Any help really appreciated