且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

RDBMS与用于文件存储的文件系统

更新时间:2023-11-29 13:42:04

鉴于不希望更改文件,将文件保留在DBMS中的价值有限.将文件保留在DBMS中的主要优点是DBMS知道如何管理事务,但是如果文件不会更改,则该优点将变得微不足道.

Given that the files are not expected to change, there is limited value in keeping the files in the DBMS. The primary advantage of keeping files in the DBMS is that the DBMS knows how to manage transactions, but if the files won't change, then that advantage becomes minuscule.

在DBMS中存储文件的另一个优点是数据库备份将包含这些文件;如果文件分别存储,则必须备份文件的单独存储空间以及DBMS本身,以确保所有数据的安全.

Another advantage of storing files in the DBMS is that the database backup will contain the files; with the files stored separately, you have to backup the separate stash of files as well as the DBMS itself to keep all the data secure.

在DBMS中存储文件的另一个优点是,数据库可以对文件的访问实施更细微的控制.

Another advantage of storing files in the DBMS is that the database can enforce more subtle controls on access to the files.

将文件存储在文件系统中的主要优点是很容易(更容易)查看所拥有的内容.

The primary advantage of storing the files in the file system is that it is easy (easier) to see what you've got.

第二个优点是您可以在DBMS外部备份或操作文件-尽管从某些角度来看这也是一个缺点.

A secondary advantage is that you can back up or manipulate the files outside the DBMS - though that is also a disadvantage from some points of view.

如果文件存储在DBMS的blob中,则普通的SQL客户端软件可以通过普通的SQL连接检索内容.如果SQL客户端软件与DBMS和文件不在同一台计算机上,则您必须担心客户端如何获取文件数据.

If the files are stored in blobs in the DBMS, then the normal SQL client software can retrieve the contents over a normal SQL connection. If the SQL client software is not on the same machine as the DBMS and the files, then you have to worry about how clients do get hold of the file data.

将文件与DBMS分开的另一个优点是可以将文件存储在DBMS计算机之外.另一方面,这会使将文件装入DBMS"的过程变得复杂.

Another advantage of separating the files from the DBMS is that the files could be stored off the DBMS machine. On the other hand, that then complicates getting the files loaded 'into the DBMS'.

总的来说,鉴于上述问题,采用"DBMS中的文件"方法似乎具有一些优势.另一方面,许多人的确采用文件系统中的文件"方法,并且他们幸免于难.可能是他们的SQL客户端与DBMS在同一台计算机上,因此文件传输问题不是无法克服的,但这是我最担心的问题.

On the whole, given the issues outlined above, there seem to be some advantages with going with the 'files in DBMS' approach. On the other hand, many people do go with 'files in file system' approach, and they survive. It may be that their SQL clients are on the same machine as the DBMS, so the file transfer issues are not insurmountable, but that's the bit that has me most worried.