I have a few simple questions about data storage on a website I am developing. The site in question will allow users a personal profile space which they have the ability to customise with text, images, BB code and alike. These profiles will have a character limit of around 5000. I was wondering how best to store this data, as it seems like a large amount to store in the database.
I was thinking about maybe using simple text files to store the data, and name them with the users ID. What do you guys think would be best for access and write speed, and would it detract from database read/write performance; as viewing and updating profiles will be a large part of the website.
Thanks guys. I look forward to hearing your opinions.
I would go for storing them in the database because:
On the other hand if you use the filesystem:
More generally
Using the filesystem is used because storing large blobs in a db can be slow.
However you should not optimize until slowness sets in.
Premature optimization is the root of all evil.Slowness may never be a problem and besides you can do lots of optimization in the DB as well.