<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Images in a database</title>
	<atom:link href="http://www.pythian.com/news/1314/images-in-a-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/1314/images-in-a-database/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 19 Mar 2010 18:10:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sheeri K. Cabral</title>
		<link>http://www.pythian.com/news/1314/images-in-a-database/#comment-362322</link>
		<dc:creator>Sheeri K. Cabral</dc:creator>
		<pubDate>Wed, 10 Jun 2009 14:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/?p=1314#comment-362322</guid>
		<description>Dups -- it is a good story, but the plural of &quot;story&quot; is not &quot;data&quot;.  

:)

I will agree, though, that in *most* cases storing images in the database is not the best solution overall for performance.  But performance isn&#039;t always the only factor, either.  Sometimes it&#039;s more important to have the database consistent, and have BLOBs be easily auditable in the same manner as other data.</description>
		<content:encoded><![CDATA[<p>Dups &#8212; it is a good story, but the plural of &#8220;story&#8221; is not &#8220;data&#8221;.  </p>
<p>:)</p>
<p>I will agree, though, that in *most* cases storing images in the database is not the best solution overall for performance.  But performance isn&#8217;t always the only factor, either.  Sometimes it&#8217;s more important to have the database consistent, and have BLOBs be easily auditable in the same manner as other data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dups</title>
		<link>http://www.pythian.com/news/1314/images-in-a-database/#comment-362314</link>
		<dc:creator>Dups</dc:creator>
		<pubDate>Wed, 10 Jun 2009 13:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/?p=1314#comment-362314</guid>
		<description>Good post.

I&#039;ve always been a fan of looking at the entire picture when figuring out what to do. And just because something can do it doesn&#039;t mean you should. I mean a hammer *can* open a peanut, doesn&#039;t mean you should. A similar analogy I once read about storing blob data in a RDBMS: You can store the entire cow in a fridge, but wouldn&#039;t it make sense to store it as steaks? Not that I am saying not to use blobs, just as with anything, use them wisely ;)

So I think the points you raise are good. There is no hard and fast rule. I would argue that in most cases storing large binary data that you need to access frequently might not be what you want to do on a high trafficked web site. However, if you can cache those files to disk to serve them, then where you store them might not be as big of a deal.

As you say it is all about finding the sweet spot in the system, in fact in *YOUR* system :) I was witness to a SQL Server implementation gone horribly wrong where thousands of binary attachments were stored into a database. I am not a SQL Server DBA so I can&#039;t speak to the ins and outs of why it happened... however the result was that for 400 people (so not huge by any means) the DB started crawling and the backups of the DB became unmanageable. In the end I believe the system was changed to not store images and the whole thing improved dramatically.

With things like memcached these days and the potential to move images off to some high performance file system or even creating a CDN like system with a DB In the background I think there are lots of options.

I would even add how your server communicates with the DB in a particular network might even have an affect on which method you decide.

So many options.</description>
		<content:encoded><![CDATA[<p>Good post.</p>
<p>I&#8217;ve always been a fan of looking at the entire picture when figuring out what to do. And just because something can do it doesn&#8217;t mean you should. I mean a hammer *can* open a peanut, doesn&#8217;t mean you should. A similar analogy I once read about storing blob data in a RDBMS: You can store the entire cow in a fridge, but wouldn&#8217;t it make sense to store it as steaks? Not that I am saying not to use blobs, just as with anything, use them wisely ;)</p>
<p>So I think the points you raise are good. There is no hard and fast rule. I would argue that in most cases storing large binary data that you need to access frequently might not be what you want to do on a high trafficked web site. However, if you can cache those files to disk to serve them, then where you store them might not be as big of a deal.</p>
<p>As you say it is all about finding the sweet spot in the system, in fact in *YOUR* system :) I was witness to a SQL Server implementation gone horribly wrong where thousands of binary attachments were stored into a database. I am not a SQL Server DBA so I can&#8217;t speak to the ins and outs of why it happened&#8230; however the result was that for 400 people (so not huge by any means) the DB started crawling and the backups of the DB became unmanageable. In the end I believe the system was changed to not store images and the whole thing improved dramatically.</p>
<p>With things like memcached these days and the potential to move images off to some high performance file system or even creating a CDN like system with a DB In the background I think there are lots of options.</p>
<p>I would even add how your server communicates with the DB in a particular network might even have an affect on which method you decide.</p>
<p>So many options.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
