文档保存为BLOB在SQL或文件系统 [英] Save documents as BLOB in SQL or on file system

查看:145
本文介绍了文档保存为BLOB在SQL或文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于(.NET)的Web应用程序,我需要允许用户存储不少的文档(PDF,.DOCX等)。 我的第一个想法是给所有的文件保存为一个SQL(前preSS)数据库中的BLOB。

For a (.net) web application I need to allow users to store many documents (pdf, .docx etc.). My first thoughts were to save all the documents as a BLOB in a SQL (Express) database.

但如何将我的数据库增长?它是更好地保存所有文件到文件系统?

But how will my database grow? Is it better to save all the documents into the file system?

我个人还是认为我是因为业绩保存文件到数据库的更好。但我不知道和好奇的你人认为。

Personally I still think that I'm better of saving the documents into the database, because of performance. But I'm not sure and curious what you folks think.

编辑 - 我的结论:如果文件大小小于1Mb的和/或文件很少编辑您应该存储由于性能的SQL服务器上的文件。如果该文件将被编辑了很多和/或大于1Mb的您应该将文件保存到文件系统。 由于许多感谢a_horse_with_no_name;)

Edit - My conclusion: If the file size is less then 1Mb and/or the file is rarely edited you should store the file in SQL server, because of the performance. If the file will be edited a lot and/or is greater then 1Mb you should store your file into the file system. With many thanks to a_horse_with_no_name ;)

推荐答案

无论是在数据库中的BLOB较慢或低于本地文件系统速度更快,要看的BLOB的大小。

Whether BLOBs in the database are slower or faster than native filesystem, depends on the size of the BLOBs.

此文章由微软可能是有趣的你:

This article from Microsoft might be interesting for you:

http://research.microsoft.com/apps/pubs/的Default.aspx?ID = 64525

这篇关于文档保存为BLOB在SQL或文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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