本文介绍了MongoDB在哪里将其文档存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在PHP中使用MongoDB插入和获取了数据.在某处的文档中是否有此数据的实际副本?

I have inserted and fetched data using MongoDB, in PHP. Is there an actual copy of this data in a document somewhere?

推荐答案

MongoDB将其数据存储在.它使用数据库格式,因此不是 actual 文档,但是每个文件中都有多个文档,因此您无法轻松地从此格式中提取数据.

MongoDB stores it's data in the data directory specified by --dbpath. It uses a database format so it's not actual documents, but there are multiple documents in each file and you cannot easily extract the data from this format yourself.

要阅读和/或更新文档,您需要使用MongoDB客户端,就像通过MySQL客户端将SQL查询发送到MySQL一样.您可能希望通过使用您的编程语言的客户端库之一以编程方式进行此操作,但是还有一个命令行客户端.

To read and/or update a document you need to use a MongoDB client, in the same way that you send SQL queries to MySQL through a MySQL client. You probably want to do it programmatically by using one of the client libraries for your programming language, but there is also a command-line client if you need to do manual updates.

这篇关于MongoDB在哪里将其文档存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 10:30
查看更多