Some people tell me null is evil within a relational database is this true or just subjective?
-
1possible duplicate: http://stackoverflow.com/questions/163434/are-nulls-in-a-relational-database-okay – Robin Chander Nov 14 '12 at 02:27
-
1You know what is evil? Not searching SO before you ask a question... – Mitch Wheat Nov 14 '12 at 02:46
-
2Sorry must have woken the Troll (Mitch Wheat) under the stack overflow bridge constructive not abusive answers only please! – Stuart Bicknell Nov 14 '12 at 03:03
-
1@MitchWheat You know what's more evil than that, when you do a search for a question and get Stackoverflow as the result, only instead of the answer you are looking for you get some tool bag telling the OP that they should "do a search for the answer." That's evil. And Annoying. – Josh Campbell Jun 28 '13 at 17:00
-
@Josh Campbell : You know how you can solve that? Get busy answering some questions... Plus there is a link to the duplicate. I find that clicking them helps. :) – Mitch Wheat Jun 29 '13 at 00:58
2 Answers
I wouldn't go so far as to call them evil but on balance yes, the data management world would be / would have been better off without nulls. Nulls as we know them today are a feature of SQL, not of the relational model per se. The introduction of nulls into database systems and the errors that have resulted from them must have cost the industry many $millions over the years.
I can't put it any better than Chris Date in this video.

- 24,981
- 1
- 44
- 82
-
I just watched that one hour video (a Stack Exchange answer should not take an hour to get through). Chris Date explained his viewpoint very eloquently. I disagree with most of it. The last few minutes explain alternatives to `NULL`. One is to use "special values"™, e.g. numeric plus `???`. One is to split your data into different tables! E.g. `salaried_employees`, `unsalaried_employees`, `unknown_salary_employees`. Another is essentially an EAV model. He is trying to move responsibility for good design from the programmer to the database vendor. – CJ Dennis Jul 27 '19 at 04:53
Answer:
I believe in black and white answers... Yes, Null values in a relational database are bad. Some individuals (including senior level DBAs) will argue that some NULL values are fine for this that and other, but this is like saying some water in a gas tank is OK. Yes, technically a car will still run, albeit poorly, with some water in the tank, but wouldn't you avoid it if you could? The more NULL values in a database the more SQL you will write for your reports.
If data is optional then the business model obviously does not "need" it, and so you're better off either leaving it out or enforcing it so that it must be captured.
Recomendation
For individuals looking for answers to this and similar questions, I cannot recommend Database Design for Mere Mortals: second edition strong enough. It was recommended to me by a software architect and I have yet to meet anyone who recommends anything else. I actually purchased two copies just in case.
There is also a newer Database Design for Mere Mortals: third edition by the same author. I have not purchased this yet, so I can't say better or worse.
Personal Note: As far as this Question & answer being "primarily opinion-based" goes, please bear in mind that an opinion without logical evidence to the contrary is not opinion at all- It's a fact. If another SSRS or Crystal Reports Analyst/Developer comes in here and says "NULL values are no problem at all" then I will remove my answer.

- 450
- 10
- 23
-
1*Note: Anyone who downvotes this answer, without providing logical reasoning to the contrary is of no good use to anyone on this site. Try helping on Yahoo answers instead- I see a lot of voting without explainations over there. – Josh Campbell Jul 08 '13 at 18:19