bcamp1973 Posted February 13, 2007 Share Posted February 13, 2007 Just curious...i'm creating a CMS that manages documents (.txt,.doc,.psd,.jpg) among other things. I know files can be dumped into a database, but i'm wondering if it makes more sense to drop them into directories on the server instead for performance or other reasons? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 13, 2007 Share Posted February 13, 2007 Depends... if you're accessing it from a single machine, then having the files managed by the disk I/O is much better than having them in/out of a DB. Quote Link to comment Share on other sites More sharing options...
bcamp1973 Posted February 14, 2007 Author Share Posted February 14, 2007 That definitely makes sense. I'm guessing the average file size is probably going to be under 100k so it won't be a huge difference I imagine? I won't be dealing with high user loads either. hmm...decisions, decisions Quote Link to comment Share on other sites More sharing options...
btherl Posted February 14, 2007 Share Posted February 14, 2007 You can store the files in the filesystems, and store metadata in the database. Then you get the best of both worlds - the power of SQL for searching metadata, plus the efficiency and ease of use of a filesystem for the files. Binary data is certainly better suited to the filesystem than a database. Quote Link to comment Share on other sites More sharing options...
fenway Posted February 14, 2007 Share Posted February 14, 2007 I totally agree. Quote Link to comment Share on other sites More sharing options...
bcamp1973 Posted February 14, 2007 Author Share Posted February 14, 2007 Filesystem it is then! Thanks to both of you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.