How can I avoid NULLs in my database, while also representing missing data?

前端 未结 8 2003
予麋鹿
予麋鹿 2020-12-12 14:19

In SQL and Relational Theory (C.J. Date, 2009) chapter 4 advocates avoiding duplicate rows, and also to avoid NULL attributes in the data we store. While I have

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 14:22

    nulls are a consequence of theory meeting reality and having to be adjusted to be usable. In my opinion attempting to avoid all null values will ultimately lead to uglier and less maintainable code than just using null where appropriate.

提交回复
热议问题