将文档作为Blob存储在数据库中-有什么缺点吗? [英] Storing Documents as Blobs in a Database - Any disadvantages?

查看:120
本文介绍了将文档作为Blob存储在数据库中-有什么缺点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的文档管理系统的要求是:

The requirements for my document management system were:

  1. 必须通过简单复制目录,文件等来防止盗窃.
  2. 必须安全防范传统病毒感染(物理文件感染)
  3. 必须快速检索
  4. 临时(目录)浏览的用户等不能看到该存储库.

我决定将所有文档(和扫描的图像)以blob的形式存储在数据库中,到目前为止,我的经验非常好,文档检索的速度也非常快-满足以上所有条件,甚至还有几个其他优点,例如将文档及其相关实体一起自动存储,轻松快速地进行内容缓存,删除文档打开和命名周围的各种用户活动等.

I have decided to store all documents (and scanned images) as blobs in the database and so far my experience is wonderful and document retrieval is blindingly fast as well - it meets all the criteria from above and there are even a couple of additional advantages, such as autostoring documents together with the entity it relates to, easy and fast seaching of contents, removing of all sorts of user activities around opening and naming of documents etc. etc.

我的问题是-在此设计和实现中是否存在任何严重的风险或我忽略的事情?

My question is - are there any serious risks or things that I overlooked with this design and implementation?

编辑注意:DB是PostgreSQL,可以很好地处理BLOBS,并且伸缩性非常好.环境是多用户.

EDIT Note: DB is PostgreSQL, handles BLOBS very well and scales exceptionally well. The environment is Multi-user.

推荐答案

当您的数据库越来越大时,将变得更加难以备份. 还原具有超过100 GB数据的表的备份并不能使您感到满意.

When your DB grows bigger and bigger it will become harder to backup. Restoring a backup of a table with over 100 GB of data is not something that makes you happy.

得到的另一件事是,随着数据集的增长,所有表管理功能的运行速度越来越慢.
但这可以通过使数据表仅包含2个字段来克服: ID和BLOB.

Another thing that get is that all the table management functions get slower and slower as the dataset grows.
But this can be overcome by making your data table just contain 2 fields: ID and BLOB.

(通过主键)检索数据只会在您备份数据集遇到麻烦后很长一段时间才成为问题.

Retrieving data (by primary key) will likely only become a problem long after you hit a wall with backing up the dataset.

这篇关于将文档作为Blob存储在数据库中-有什么缺点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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