I'm writing an application where users can upload files in one of a few formats and then access it any of those formats. I'm storing the开发者_运维技巧 files in a database. I'm wondering whether I should
- store all of the different file types in the database or
- store just the original file on the database and convert the files when they are needed.
The first approach makes my database larger. The second option makes access faster. The second option wouldn't be an option if the files took a long time to convert (like video), but the files I'm serving don't take long to convert.
What other factors might I consider?
(And I'm leaning very strongly towards the first approach.)
精彩评论