Storing files in the database or the filesystem?

Posted on July 7, 2008
Filed Under blog |

Storing files in the database or the filesystem? Take a look at wikipedia’s server layout diagram.

800px-wikimedia-servers-2006-05-09svg.jpg

Ok, take a good look at the diagram.

I could not think of any applicable situation where storing files in the database is the best way. Maybe for small applications you could use the database for storing files but then when it grows, changing it to the filesystem will just add lots of headache in the future. Why not do it right from the start?

"Too many inherent problems in storing binary data in the database, IMHO. The database is for data, and the filesystem is for files."
- Best way to store file with SQL server as its database

Youtube, Wikipedia, uses filesystem to store files. And it works. Do we have time to try out methods that doesn’t work? Maybe it could work, but the down the road, the pain that must be endured.

Here’s some points on filesystem vs database thing (taken from other sites).

Comments

One Response to “Storing files in the database or the filesystem?”

  1. Bookmarks about Filesystem on July 31st, 2008 5:20 pm

    […] - bookmarked by 3 members originally found by predatorgirl on July 17, 2008 Storing files in the database or the filesystem? http://mkhairul.com/2008/07/07/storing-files-in-the-database-or-the-filesystem/ - bookmarked by 2 […]

Leave a Reply