MySQL foreign key to allow NULL?

后端 未结 1 2072
日久生厌
日久生厌 2020-11-30 10:42

I\'m piecing together an image website. The basic schema\'s pretty simple MySQL, but I\'m having some trouble trying to represent possible admin flags associated with an ima

相关标签:
1条回答
  • 2020-11-30 11:19

    You can solve this by allowing NULL in the foreign key column tblImageFlags.resolutionTypeID.


    PS Bonus points to whomever tells me whether, in the case of databases, it's "indexes" or "indices".

    The plural of index should be indexes.

    According to "Modern American Usage" by Bryan A. Garner:

    For ordinary purposes, indexes is the preferable plural, not indices. ... Indices, though less pretentious than fora or dogmata, is pretentious nevertheless. Some writers prefer indices in technical contexts, as in mathematics and the sciences. Though not the best plural for index, indices is permissible in the sense "indicators." ... Avoid the singular indice, a back-formation from the plural indices.

    0 讨论(0)
提交回复
热议问题