Can a table store the actual file upload in SQL Server or just the path to the file name?

Posted on 2005-04-20
Medium Priority
Last Modified: 2010-03-19
I want to add an upload file function to my page and store a copy of the file on my server.  I've done this many times by saving the path to the file in the database and saving the file to a folder on the server.  Is it possible to create a field in SQL Server that can hold the actual file or should I just keep using folders to store the files?  Thanks.
Question by:Ike23
LVL 17

Accepted Solution

Tacobell777 earned 800 total points
ID: 13829581
It is possible to store the file in the database as binary data, but its not really recommended unles syou have specific reasons to do so. It will probably be a little slower. Its harder to manage in some cases.

LVL 28

Assisted Solution

rafrancisco earned 600 total points
ID: 13830698
Aside from the points made by Tacobell777, backing up your database will take longer because of the size of the files.  Backing up of the actual files will be easier if it is on a folder.

Also, you can have the option of zipping the uploaded files to save space and unzipping it when the files are needed.  This can be done by your application as an added feature.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

809 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