Note that in MongoDB, my tickets collection did not need to be created beforehand.
请注意在MongoDB中,我的tickets集合无需提前创建。
To persist this document, I have to associate it with a collection, which is similar to a schema in relational terms. In Listing 5, I associate the ticket with a tickets collection.
要持久化此文档,我不得不将其与collection关联在一起,这类似于关系术语中的“模式”。
The find command without any parameters simply returns all documents in a particular collection, which in this case is named tickets.
不带任何参数的find命令简单地返回一个特定集合中的所有文档,在本例中名为tickets。
应用推荐