gpt4 book ai didi

数据库与文件系统存储

转载 作者:太空狗 更新时间:2023-10-30 01:37:58 25 4
gpt4 key购买 nike

数据库最终将数据存储在文件中,而文件系统也将数据存储在文件中。在这种情况下,数据库和文件系统之间有什么区别。是检索方式还是其他原因?

最佳答案

A database is generally used for storing related, structured data, with well defined data formats, in an efficient manner for insert, update and/or retrieval (depending on application).

On the other hand, a file system is a more unstructured data store for storing arbitrary, probably unrelated data. The file system is more general, and databases are built on top of the general data storage services provided by file systems. [Quora]

如果您要查找特定文件,文件系统很有用,因为操作系统维护着一种索引。然而,txt 文件的内容不会被索引,这是数据库的主要优点之一。

对于非常复杂的操作,文件系统可能会非常慢。

RDBMS 的主要优势:

  • 表是相互关联的

  • SQL查询/数据处理语言

  • 向 SQL (Transact-SQL) 添加事务处理

  • 使用存储过程、函数、触发器、 View 等服务器端对象的服务器-客户端实现

文件系统相对于数据库管理系统的优势是:

当处理包含任意的、可能不相关的数据的小数据集时,文件比数据库更有效。对于简单操作,读、写、文件操作更快更简单。

您可以在互联网上找到 n 种差异。

关于数据库与文件系统存储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38120895/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com