你的理由在数据库中存储blob小于0.3 MB? [英] your reasons to store blobs less than 0.3 MB in database?
问题描述
[1],[2]和许多其他参考文献给出的结论是,在文件系统中(可能通过FILESTREAM),大小小于0.3-1 MB的BLOB应存储在数据库中,而BLOB大于1 MB。
[ 1 ], [ 2 ] and many other references gives conclusion that BLOBs with size less tha 0.3-1 MB should be stored in database while BLOBs larger than 1 MB - in file system (possibly through FILESTREAM).
FACEBOOK.com存储6.5(30个缩略图和大小版本)数十亿图片在文件系统[3]。
FACEBOOK.com stores 6.5 (30 with thumbnails and size versions) billions pictures in files system [ 3 ].
Randal的白皮书[2]推荐:
Randal's white paper [ 2 ] reasons it by:
好吧,这不能说服我在数据库中存储blob的必要性,只是他们不应该访问/通过T-SQL外部流式传输,而是通过Win32。
Well, this does not convince me about necessity to store blobs in database but just about the fact that they should not be accessed/streamed externally through T-SQL but rather through Win32.
其他原因,我已经阅读,也不看起来令人信服。
Other reasons, I did read, also do not look as convincing to me.
将blob存储在数据库而不是文件系统中的原因是什么?
What are your reasons to store blobs in database instead of in file system?
[1]
Ray Barley。使用FILESTREAM将BLOB存储在SQL Server 2008中的NTFS文件系统中
http://www.mssqltips.com/tip.asp?tip=1489
[2]
Paul S. Randal
SQL Server 2008中的FILESTREAM存储
http://msdn.microsoft.com/en-us/library/cc949109(SQL.100).aspx
[3]
James Hamilton的博客文章。 Facebook:Haystack中的针:高效存储数十亿张照片
http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx
推荐答案
将这样的数据存储在数据库而不是文件系统中可以有许多优点:
There can be many advantages to storing such data in a database rather than a filesystem:
数据完整性 - 可以对其实现约束
Data integrity - you can implement constraints on it
交易支持
可管理性 - 备份和恢复选项
Manageability - backup and restore options
高可用性 - 数据库有比文件系统更复杂的镜像和聚类选项。
High availability - databases tend to have more sophisticated options for mirroring and clustering than file systems do.
安全性 - 你得到的是不使用文件系统的细粒度的安全控制
Security - you get the kind of fine-grained security controls that you do not with a filesystem
辅助功能 - 数据库中的表格可供所有类型的应用程序访问,用于演示和分析。可以使用SQL语句轻松查询数据库
Accessibility - tables within a database are accessible to all sort of applications for presentation and analysis purposes. Databases can easily be interrogated with SQL statements
审计 - 可以记录和监视数据更改
Audit - you can record and monitor changes to data
有很多,许多其他原因,但这些是第一次想到的。
I expect there are many, many other reasons but these are the ones that first came to mind.
这篇关于你的理由在数据库中存储blob小于0.3 MB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!