dbTalk Databases Forums  

Storing binary files in MS SQL 2000

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Storing binary files in MS SQL 2000 in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ringo Langly
 
Posts: n/a

Default Storing binary files in MS SQL 2000 - 05-04-2005 , 04:22 PM






Hi folks,

Is it possible to store Binary Files in MS SQL 2000 ??? Say I have a
100K PDF or a 150K word document. Is it possible to store this in a
field in MS SQL and pull it out somehow? We're using ColdFusion on the
server on Apache.

Thanks,

Ringo


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Storing binary files in MS SQL 2000 - 05-04-2005 , 04:47 PM






Ringo Langly (rlangly (AT) gmail (DOT) com) writes:
Quote:
Is it possible to store Binary Files in MS SQL 2000 ??? Say I have a
100K PDF or a 150K word document. Is it possible to store this in a
field in MS SQL and pull it out somehow? We're using ColdFusion on the
server on Apache.
Yes, it's possible. You would use the image data type for this.
Unfortunately, I no nothing about ColdFusion, so I cannot give any
example of how to this in Cold Fusion. Working with image is however
more complex than other data types in SQL Server.

I should also add that there is a second alternative recommended by
many: store only the file path in SQL Server, and the file on disk.
I'm been proposing this myself at times. The main advantange is that
development becomes a lot simler. These days, however, I lean towards
storing the files in the database, as this is more robust and easier
to maintain. One single backup gets it all.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Reply With Quote
  #3  
Old   
pb648174
 
Posts: n/a

Default Re: Storing binary files in MS SQL 2000 - 05-05-2005 , 11:03 AM



Doesn't that have performance implications?

Erland Sommarskog wrote:
Quote:
Ringo Langly (rlangly (AT) gmail (DOT) com) writes:
Is it possible to store Binary Files in MS SQL 2000 ??? Say I have
a
100K PDF or a 150K word document. Is it possible to store this in
a
field in MS SQL and pull it out somehow? We're using ColdFusion on
the
server on Apache.

Yes, it's possible. You would use the image data type for this.
Unfortunately, I no nothing about ColdFusion, so I cannot give any
example of how to this in Cold Fusion. Working with image is however
more complex than other data types in SQL Server.

I should also add that there is a second alternative recommended by
many: store only the file path in SQL Server, and the file on disk.
I'm been proposing this myself at times. The main advantange is that
development becomes a lot simler. These days, however, I lean towards
storing the files in the database, as this is more robust and easier
to maintain. One single backup gets it all.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Storing binary files in MS SQL 2000 - 05-05-2005 , 04:11 PM



pb648174 (google (AT) webpaul (DOT) net) writes:
Quote:
Doesn't that have performance implications?
To store the documents in the database? Sure, it's more expensive than
to store the documents on disk. Then again, there is some network time
here, and file or database, you need to transfer the file over the
network.

In any case, sacrifcing database consistency for increased performance
is rarely a good trade-off.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.