Hi. Everyone is going to tell you that you must store it in the database. The reason are that in different OS's, there is a limit to how many files you can store in each directory. (windows i think is 10000). I was faced with this same problem under a time constraint, so never took the time to figure out how to store the file directly into the database. So i went the a directory storing route. What I did was Create a directory root\1\1a\1aa\file.extension like this. Set a limit to the amount of files in this directory and when that limit was reached incremented the directory name to root\1\1a\1ab etc etc. And then just stored the directory and filename in the database and retrieved it like that. I'm pretty sure that this is not the correct way to do this sort of thing, but it does work. I will be watching this mail to find out how to do it properly.
-----Original Message----- From: Andy Timm [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 9:53 AM To: [EMAIL PROTECTED] Subject: When to store files in DB vs. File system Hello, I am developing a webapp where users need to store files (<200k). I am wondering if these should be stored in the (mysql) database, or in the file system. I am concerned about the number of files I could get in the database (possibility for 20,000+ users, so 100,000 files). On the other hand, I plan on replicating my database across multiple servers. Do I then also replicate the download of each file, or run a batch that copies them periodically? I would greatly appreciate advice from anyone who has dealt with these design issues. Thank you, Andrew Timm __________________________________________________ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

