数据库中的图像与文件系统 [英] Images in database vs file system

查看:103
本文介绍了数据库中的图像与文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个项目,我们将建立一个整个后端CMS系统,将为我们的整个外联网和内部网与一个包。我一直在努力找到答案是什么是更好的:存储图像在数据库(SQL Server 2005),所以我们可以有完整性,单一复制计划等或存储在文件系统上?

We have a project coming up where we will be building a whole backend CMS system that will power our entire extranet and intranet with one package. The question I have been trying to find an answer to is which is better: storing images in the database (SQL Server 2005) so we may have integrity, single replication plan, etc OR storing on the file system?

我们有一个问题是,我们有多个服务器负载均衡,需要始终拥有相同的数据。到目前为止,我们有SQL复制照顾,但文件复制似乎有点困难。另一个问题是,我们想要同一个图像的多个分辨率,我们不知道如果在文件系统上创建和存储每个版本将是最好的,或者动态拉和创建我们想要的分辨率图像。

One issue we have is that we have multiple servers load balanced that require to have the same data at all times. As of now we have SQL replication taking care of that but file replication seems to be a little tougher. Another concern we have is that we would like to have multiple resolutions of the same image, we are not sure if creating and storing each version on the file system would be best or maybe dynamically pulling and creating the resolution image we would like upon request.

我们的关注点如下:


  • 数据完整性

  • 数据复制

  • 多个分辨率

  • 数据库速度vs文件系统

  • 数据库与文件系统的开销负载

  • 数据管理和备份

  • Data integrity
  • Data replication
  • Multiple resolutions
  • Speed of database vs file system
  • Overhead load of database vs file system
  • Data management and backup

类似的情况或有什么建议的投入?感谢您的帮助!

Does anyone have a similar situation or have any input on what would be recommended? Thanks in advance for the help!

推荐答案

有一个很好的研究论文由微软研究所发布的到Blob或不到Blob ,他们查看各种变量和影响。

There was a nice research paper published by Microsoft Research called To Blob or not to Blob where they looked at all sorts of variables and impacts.

他们的结论:


  • 大小最大为256 KB,blob在数据库中比在文件系统中更有效地

  • 对于1MB或更大的文件系统,文件系统更有效


SQL Server 2008还添加了FILESTREAM属性,可以在文件系统中存储内容,事务控制,现实。强烈推荐你检查一下!

Since that paper was published, SQL Server 2008 has also added the FILESTREAM attribute which makes storing stuff in the file system, but under transactional control, a reality. Highly recommended you check that out!

这篇关于数据库中的图像与文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆