首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Couchdb数据库设计选项

问Couchdb数据库设计选项
EN

Stack Overflow用户
提问于 2014-07-26 14:31:45
回答 1查看 938关注 0票数 6
  1. 建议在couchdb中为每种文档类型建立一个单独的数据库,还是将所有类型的文档放在一个数据库中?
  2. 我们可以在couchdb上创建的数据库数量是否有任何限制?
  3. 在couchdb中创建大量数据库有什么缺点吗?
EN

回答 1

Stack Overflow用户

发布于 2014-08-21 16:30:15

  1. 没有坚定的答案。以下是一些指导方针:

代码语言:javascript
复制
- If two documents must be visible to different sets of users, they must be in different DBs (read/write privs are per-DB, not per-doc).
- If two documents must be included in the same view, they must be in the same DB (views are for a single DB only).
- If two types of documents will be numerous and never be included in the same view, they might as well be in different DBs (so that accessing a view over one type won't need to process all of the docs of the other type).
- It's cheap to drop a database, but expensive to delete all of the documents out of a database. Keep this in mind when designing your data expiration plan.

​

  1. 没有硬编码,但您最终将开始遇到资源约束,这取决于您可用的硬件。
  2. 这取决于你所说的“大数字”是什么意思。千千万万没有问题;数十亿美元可能没有问题(尽管Cloudant的更改将出现在v2.0.0中,我猜对DB计数的合理上限可能会上升)。
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24972063

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档