Re: Uploading Files Should I use MySQL or Server for storage?
| From: | Richard Lynch | Date: | Tue, 22 May 2007 00:28:31 +0000 |
| Subject: | Re: Uploading Files Should I use MySQL or Server for storage? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255291@lists.php.net to get a copy of this message | ||
On Sun, May 20, 2007 8:16 pm, benc11@gmail.com wrote:
> I am in the process of adding a part to my website which would include
> pictures, pdf files, txt files, and excel files. The files sizes
> could be anywhere on average of 100k to 2mb. Do you think I should be
> uploading the files to a MySQL database or to my server?
>
> I have head that there are pros and cons to both, but have never
> really received a definitive answer that helps much. I appreciate all
> your opinions on the pros and cons of both.
We've pretty much beat this horse to death around here...
So I'll try to give just one sample of each:
DB PRO:
Deleting image data can be simpler.
DB CON:
Difficult to scale out the DB when it has so much blob data; easy to
set up "image server" to segment architecture when it's just a bunch
of files to move and a line of PHP code to change the base URL.
There are enough fanatics on both sides of this coin...
I'm in the "put it in the file system" camp.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?