Should I use flat tables or a normalized database?

前端 未结 7 998
南方客
南方客 2021-02-19 03:39

I have a web application that I am currently working on that uses a MySQL database for the back-end, and I need to know what is better for my situation before I continue any fur

7条回答
  •  故里飘歌
    2021-02-19 04:18

    Altering the schema during runtime is rarely a good idea. What you want to consider is the EAV (Entity-Attribute-Value) model.

    Wikipedia has some very good info on the pros and cons, as well as implementation details. EAV is to be avoided when possible, but for situations like yours with an unknown number of columns for each form, EAV is woth considering.

提交回复
热议问题