Storing multiple choice values in database

前端 未结 9 2083
猫巷女王i
猫巷女王i 2020-12-10 21:24

Say I offer user to check off languages she speaks and store it in a db. Important side note, I will not search db for any of those values, as I will have some separate sear

9条回答
  •  自闭症患者
    2020-12-10 21:53

    You seem to be extremely worried about adding in a few extra lookup table joins. In my experience, the time it takes to actually transmit the HTML response and have the browser render it far exceed a few extra table joins. Especially if you are using indexes for your primary and foreign keys (as you should be). It's like you are planning a multi-day cross-country trip and you are worried about 1 extra 10 minute bathroom stop.

    The lack of long-term flexibility and data integrity are not worth it for such a small optimization (which may not be necessary or even noticeable).

提交回复
热议问题