?
Solved

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

Posted on 2011-09-16
3
Medium Priority
?
418 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Sudaraka Wijesinghe earned 1000 total points
ID: 36553679
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
ID: 36556762
I just want to second sudaraka's comments - he is 100% correct.
0
 

Author Closing Comment

by:GarySB
ID: 36561697
Thanks
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

771 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