Solved

Where to store zip file for online downloads?  Folder or MySQL Database?

Posted on 2011-09-16
3
345 Views
Last Modified: 2012-05-12
I have a zip file that will be downloaded from a website that is connected to MySQL Database.  
Where is the proper place to store the file?  
What does the field need to be defined as in the table if that method is used?  
Any size limitation?
Thank You
0
Comment
Question by:GarySB
3 Comments
 
LVL 18

Accepted Solution

by:
Sudaraka Wijesinghe earned 250 total points
Comment Utility
Although MYSQL (or any other DB system) supports storing binary objects in the database (BLOBs), it's not a good practice to do so.
Mainly because of as the amount of data grows it would slow down the DB access and will become a maintenance nightmare because you database files will be very large.

Best way to do it would be to place your binaries (zip files) on the disk, and (if they are related to any entry) on the DB have a reference to the location of that file on the disk.

If the zip files and some thing that you allow anyone to download you can place them under the web root. Or if you restrict them for certain users you should place them somewhere out side the web root and when some one need to download that (after authentication) create a temporary symbolic link to the zip file (in Linux) or use a proxy web page (php/asp script or what ever) to read the file and write the output to HTTP stream.
0
 
LVL 23

Expert Comment

by:nemws1
Comment Utility
I just want to second sudaraka's comments - he is 100% correct.
0
 

Author Closing Comment

by:GarySB
Comment Utility
Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now