简体   繁体   English

什么时候在猫鼬中使用查询人口?

[英]When to use query population in mongoose?

I will try to ask so that there is a definitive answer. 我将尝试提出一个明确的答案。 I am currently building an app that displays choose-your-own-adventure style books. 我目前正在构建一个显示自己选择的冒险风格书籍的应用。 In designing my data structure I initially was going to have a model to represent a book, then reference other documents in my database that had the pages and their content using query population. 在设计数据结构时,我最初将要有一个模型来代表一本书,然后使用查询填充来引用数据库中具有页面及其内容的其他文档。 Now, I am considering making the book one giant document in mongo/mongoose. 现在,我正在考虑将该书制作成mongo / mongoose中的一个巨型文档。 Are there any limits on mongodb or mongoose that prevent me from storing the book as one giant document? mongodb或mongoose上是否有任何限制使我无法将这本书存储为一个大文件?

基本上,文档的默认大小为16MB,足以存储大量数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM