MongoDB在哪里将其文档存储在哪里? [英] Where does MongoDB store its documents?

查看:94
本文介绍了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将其数据存储在

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一样.您可能希望通过使用您的编程语言的客户端库之一以编程方式进行此操作,但是还有一个<如果需要手动更新,请使用href ="http://docs.mongodb.org/manual/reference/program/mongo/#bin.mongo">命令行客户端.

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在哪里将其文档存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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