Re: Uploading Files Should I use MySQL or Server for storage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



benc11@xxxxxxxxx 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.

benc11,

I store most of my data in both. when i do image processing i usually upload the image, store the original in the database, process the image into its subsequent sizes or resolutions and store them on the file system. If the images get lost on the file system or my application can not find them I have the original stored in the db for reprocessing.

I store files other than images, PDF DOC etc... in the database and on the file system. i serve the document from the file system because regardless of the thread of conversation it is in my experience that 99% of the time it is faster to do so. if its not found i know i have a fall back in that it is also stored in the database so i serve that.

Sure my method uses more storage space, but I sleep at night knowing I have added redundancy.

Kind regards,

Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux