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

查看:20
本文介绍了将文档作为 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天全站免登陆