NoSQL 用例场景或何时使用 NoSQL [英] NoSQL Use Case Scenarios or WHEN to use NoSQL

查看:52
本文介绍了NoSQL 用例场景或何时使用 NoSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着大肆宣传,似乎很难找到有关何时使用它的可靠信息.所以我提出以下问题,如果这些问题真的很愚蠢,我很抱歉:

With all the hype it seems really hard to find reliable information on when to use this. So I pose the following questions, and I'm sorry if these are really dumb questions in advance:

  1. 我应该对用户数据使用 NoSQL 吗?例如.个人资料、用户名 + 密码等.
  2. 我应该对重要内容使用 NoSQL 吗?例如.文章、博客文章、产品目录等.

我假设没有?而且我觉得 NoSQL 只是用于快速访问的东西,从中可以丢失数据.但我也读到 NoSQL 应用程序具有内置冗余,因此我不会丢失数据?

I'm assuming no? And I feel like NoSQL is just for quickly accessible things from which it's OK to lose data. But I also read that NoSQL apps have built-in redundancy so that I don't lose data?

另外,如果上面两个例子不好,你能给我具体的业务用例,我会在哪些地方使用 NoSQL?我看到了很多一般性描述,但没有看到很多真实世界的例子.我唯一能想到的就是用户到用户的消息传递和分析.

Also if the above 2 examples are bad, could you give me specific business use cases where I would use NoSQL? I see a lot of general descriptions but not a lot of real-world examples. The only things I can think of are user-to-user messaging and analytics.

谢谢!

推荐答案

这确实是一个视情况而定"的问题.一些一般要点:

It really is an "it depends" kinda question. Some general points:

  • NoSQL 通常适用于非结构化/无模式"数据 - 通常,您不需要预先明确定义您的模式,只需包含新字段而无需任何仪式
  • NoSQL 通常支持非规范化架构,因为每个 RDBMS 世界都不支持 JOIN.因此,您通常会对数据进行扁平化、非规范化的表示.
  • 使用 NoSQL 并不意味着您可能会丢失数据.不同的 DB 有不同的策略.例如MongoDB - 您基本上可以选择在性能与数据丢失可能性之间进行权衡的级别 - 最佳性能 = 更大范围的数据丢失.
  • 横向扩展 NoSQL 解决方案通常很容易.添加更多节点来复制数据是一种方式:a) 提供更高的可扩展性,b) 如果一个节点出现故障,则提供更多的数据丢失保护.但同样,取决于 NoSQL DB/配置.NoSQL 并不一定意味着您推断的数据丢失".
  • 恕我直言,最好通过 RDBMS 提供复杂/动态查询/报告.NoSQL 数据库的查询功能通常是有限的.
  • 它不一定是 1 或其他选择.我的经验是将 RDBMS 与 NoSQL 结合用于某些用例.
  • NoSQL DB 通常缺乏跨多个表"执行原子操作的能力.

您确实需要查看并了解各种类型的 NoSQL 存储是什么,以及它们如何提供可扩展性/数据安全性等.很难给出全面的答案,因为它们确实各不相同,并且以不同的方式处理事情.

You really need to look at and understand what the various types of NoSQL stores are, and how they go about providing scalability/data security etc. It's difficult to give an across-the-board answer as they really are all different and tackle things differently.

以 MongoDb 为例,查看他们的用例,看看他们的建议是什么MongoDb 的非常适合"和不太适合"的用法.

For MongoDb as an example, check out their Use Cases to see what they suggest as being "well suited" and "less well suited" uses of MongoDb.

这篇关于NoSQL 用例场景或何时使用 NoSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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