Click to See Complete Forum and Search --> : most preferred and effective way of saving files


dreamer_0244
February 6th, 2008, 04:50 AM
Hi! Does anyone have an idea on which the most preferred and effective way of saving files which will be displayed in an application?
Saving it in a folder on the web server?
OR
Saving it in a table in the SQL Server Database?

Any advice would be a big help...thanks in advance!

PeejAvery
February 6th, 2008, 03:04 PM
Wow, that depends completely on what you are attempting to do, and what your resources are. Is security a concern?

You mentioned the word "preferred." This also comes into play. A matter of preference depends on the people. You may get 10 different responses just because of that word.

goatslayer
February 7th, 2008, 05:01 AM
Yes, a good place to begin might be to tell us what the application is.

Why would you save files on a web server for a standalone application for example. There may be a reason, but you need to give us some more background before we can begin to provide any suggestions really.

Arjay
February 7th, 2008, 02:29 PM
Just thought I'd mention that SQL Server 2008 has introduced new FILESTREAM data type.

"FILESTREAM Data
The new SQL Server 2008 FILESTREAM data type allows large binary data like documents and images to be stored directly in an NTFS file system; the document or image remains an integral part of the database and maintains transactional consistency. FILESTREAM enables the storage of large binary data, traditionally managed by the database, to be stored outside the database as individual files that can be accessed using an NTFS streaming API. Using NTFS streaming APIs allows efficient performance of common file operations while providing all of the rich database services, including security and backup."

You can read about this and other new features in the "SQL Server 2008 Product Overview (http://www.microsoft.com/sql/techinfo/whitepapers/sql2008Overview.mspx)".

saffionline
February 8th, 2008, 12:22 AM
I agree with suggesstion give by PeejAwary.

dreamer_0244
February 8th, 2008, 02:47 AM
Here's the case...

I have an application deployed both intranet server and internet server and accessing the same database server. Then I have this file that can be opened through accessing the intranet and internet. I want to consider the security also as this file is confidential. I am thinking that if I save it in the database, will it have an effect on the performance of the application when it opens the file though I think that this is more secure. I am also thinking that if I would just save it in a folder on the server, it would be less secure but is easier and faster when opened...I only keep 2 word files then update it daily...

Arjay
February 8th, 2008, 01:09 PM
If you are storing only two Word files (which get updated daily), then I doubt performance will be an issue in either case.

Regarding security, SQL 2005 and higher has built-in symmetric key encryption which you can use to encrypt a column in a table. If your database backup files were compromised, hackers couldn't read the data unless they had access to the keys (and those shouldn't be stored in raw form on the db server).