Should I use flat tables or a normalized database?

前端 未结 7 954
南方客
南方客 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:22

    Keep your data normalized. If you index properly, you will not encounter performance issues for a very long time.

    Regarding security: The flat approach will require you to write lots of create/drop table, alter table etc statements, ie a lot more code and a lot more points of failure.

    The only reason to have flat files would be when your users can connect to the DB directly (you could still go for row level security). But in that case, you are really reimplementing a variant of phpmyadmin

提交回复
热议问题