mysql - Database design (scheme design), should NULL be avoided as much as possible?
仅有的幸福
仅有的幸福 2017-05-18 10:54:25
0
2
565

Actual Phenomenon

Learned:

  1. NULL semantics are unclear

  2. Query is not easy to optimize

  3. If it represents a null value, there can be other alternatives (logically)

    • VARCHAR(100) NOT NULL DEFAULT '';

    • INT NOT NULL DEFAULT 0;

Expected Phenomenon

  1. I hope to understand the attitude towards NULL when designing a scheme (I remember reading an article saying that you should try: NOT NULL DEFAULT XXX)

仅有的幸福
仅有的幸福

reply all(2)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!