Is it better to store user text (such as a blog entry or private messages) in the database or as flat files?
Posted
by
Fredashay
on Stack Overflow
See other posts from Stack Overflow
or by Fredashay
Published on 2012-03-30T22:35:43Z
Indexed on
2012/03/30
23:30 UTC
Read the original article
Hit count: 166
I'm building a social networking type site that will be storing large chunks of text that's entered by users, such as blog entries and private messages. As such, these will be entered once, with minimal revisions, but many reads by multiple users over time. I'm using MySQL, by the way.
My concerns are:
Storing large blocks of text on the database will fill the database to capacity eventually.
I read somewhere that storing user text in flat files is a security risk? (The filenames will be generated dynamically by the PHP, not by the user.)
Storing them as text files may cause them to become out of sync if I ever have to reinitialize the database and restore it from backups.
What are all your thoughts and advice, pros and cons?
© Stack Overflow or respective owner