database BASE 术语解释

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3342497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 07:48:33  来源:igfitidea点击:

Explanation of BASE terminology

databasenosqlterminologydefinitionbase-db

提问by Niels van der Rest

The BASEacronym is used to describe the properties of certain databases, usually NoSQL databases. It's often referred to as the opposite of ACID.

BASE缩写,是用于描述特定的数据库,通常NoSQL数据库的属性。它通常被称为ACID的对立面。

There are only few articles that touch upon the details of BASE, whereas ACID has plenty of articles that elaborate on each of the atomicity, consistency, isolation and durability properties. Wikipedia only devotes a few linesto the term.

只有少数文章涉及 BASE 的细节,而 ACID 有大量文章详细阐述了原子性、一致性、隔离性和持久性属性中的每一个。维基百科只用了几行来说明这个词。

This leaves me with some questions about the definition:

这给我留下了一些关于定义的问题:

Basically Available, Soft state, Eventual consistency

asicallyvailable,s ^经常状态,Èventual一致性

I have interpreted these properties as follows, using this articleand my imagination:

我使用这篇文章和我的想象力将这些属性解释如下:

Basically availablecould refer to the perceived availability of the data. If a single node fails, part of the data won't be available, but the entire data layer stays operational.

基本可用可以指数据的感知可用性。如果单个节点出现故障,部分数据将不可用,但整个数据层仍可运行。

  • Is this interpretation correct, or does it refer to something else?
  • Update:deducing from Mau's answer, could it mean the entire data layer is always accepting new data, i.e. there are no locking scenarios that prevent data from being inserted immediately?
  • 这种解释是正确的,还是指别的?
  • 更新:Mau 的回答推断,这是否意味着整个数据层总是在接受新数据,即没有阻止数据立即插入的锁定方案?

Soft state: All I could find was the concept of data needing a period refresh. Without a refresh, the data will expire or be deleted.

软状态:我能找到的只是数据需要周期刷新的概念。如果不刷新,数据将过期或被删除。

  • Automatic deletion of data in a database seems strange to me.
  • Expired or stale data makes more sense. But this concept would apply to any type of redundant data storage, not just NoSQL. Does it describe something else then?
  • 自动删除数据库中的数据对我来说似乎很奇怪。
  • 过期或陈旧的数据更有意义。但是这个概念适用于任何类型的冗余数据存储,而不仅仅是 NoSQL。那么它是否描述了其他东西?

Eventual consistencymeans that updates will eventually ripple through to all servers, given enough time.

最终的一致性意味着如果有足够的时间,更新最终将波及所有服务器。

  • This property is clear to me.
  • 这个属性对我来说很清楚。


Can someone explain these properties in detail?

有人可以详细解释这些属性吗?

Or is it just a far-fetched and meaningless acronym that refers to the concepts of acids and bases as found in chemistry?

或者它只是一个牵强和毫无意义的首字母缩略词,指的是化学中发现的酸和碱的概念?

回答by Niels van der Rest

The BASE acronym was defined by Eric Brewer, who is also known for formulating the CAP theorem.

BASE 首字母缩写词由Eric Brewer定义,他也以制定CAP 定理而闻名。

The CAP theorem states that a distributed computer system cannot guarantee all of the following three properties at the same time:

CAP定理指出,分布式计算机系统不能同时保证以下三个属性:

  • Consistency
  • Availability
  • Partition tolerance
  • 一致性
  • 可用性
  • 分区容差

A BASE system gives up on consistency.

BASE 系统放弃了一致性。

  • Basically availableindicates that the system doesguarantee availability, in terms of the CAP theorem.
  • Soft stateindicates that the state of the system may change over time, even without input. This is because of the eventual consistency model.
  • Eventual consistencyindicates that the system will become consistent over time, given that the system doesn't receive input during that time.
  • 根据 CAP 定理,基本可用表示系统确实保证了可用性。
  • 软状态表示即使没有输入,系统的状态也可能随时间变化。这是因为最终一致性模型。
  • 最终一致性表示系统将随着时间的推移变得一致,因为系统在这段时间内没有接收到输入。

Brewer does admit that the acronym is contrived:

布鲁尔确实承认缩写词是人为的

I came up with [the BASE] acronym with my students in their office earlier that year. I agree it is contrived a bit, but so is "ACID" -- much more than people realize, so we figured it was good enough.

那年早些时候,我和我的学生在他们的办公室里想出了 [the BASE] 首字母缩略词。我同意它有点做作,但“ACID”也是如此——比人们意识到的要多得多,所以我们认为它已经足够好了。

回答by Mau

It has to do with BASE: the BASE jumper kind is always Basically Available (to new relationships), in a Soft state (none of his relationship last very long) and Eventually consistent (one day he willget married).

这与BASE 有关:BASE 跳线类型始终基本可用(对于新关系),处于软状态(他的关系都没有持续很长时间)和最终一致(有一天他结婚)。

回答by MANISH PRIYADARSHI

  • Basic Availability: The database appears to work most of the time.

  • Soft State: Stores don't have to be write-consistent or mutually consistent all the time.

  • Eventual consistency: Data should always be consistent, with regards how any number of changes are performed.

  • 基本可用性:数据库似乎大部分时间都在工作。

  • 软状态:存储不必始终保持写入一致或相互一致。

  • 最终一致性:关于如何执行任意数量的更改,数据应始终保持一致。

回答by Pujan Srivastava

ACID and BASE are consistency models for RDBMS and NoSQL respectively. ACID transactions are far more pessimistic i.e. they are more worried about data safety. In the NoSQL database world, ACID transactions are less fashionable as some databases have loosened the requirements for immediate consistency, data freshness and accuracy in order to gain other benefits, like scalability and resiliency.

ACID 和 BASE 分别是 RDBMS 和 NoSQL 的一致性模型。ACID 事务要悲观得多,即他们更担心数据安全。在 NoSQL 数据库世界中,ACID 事务不太流行,因为一些数据库放宽了对即时一致性、数据新鲜度和准确性的要求,以获得其他好处,如可扩展性和弹性。

BASE stands for -

BASE 代表 -

  • Basic Availability- The database appears to work most of the time.
  • Soft-state- Stores don't have to be write-consistent, nor do different replicas have to be mutually consistent all the time.
  • Eventual consistency- Stores exhibit consistency at some later point (e.g., lazily at read time).
  • 基本可用性- 数据库似乎大部分时间都在工作。
  • 软状态- 存储不必写一致,不同的副本也不必始终相互一致。
  • 最终一致性- 存储在稍后的某个时间点表现出一致性(例如,在读取时延迟)。

Therefore BASE relaxes consistency to allow the system to process request even in an inconsistent state.

因此 BASE 放宽了一致性,允许系统即使在不一致的状态下也能处理请求。

Example: No one would mind if their tweet were inconsistent within their social network for a short period of time. It is more important to get an immediate response than to have a consistent state of users' information.

示例:如果他们的推文在短时间内在社交网络中不一致,没有人会介意。获得即时响应比拥有一致的用户信息状态更重要。

回答by James Drinkard

To add to the other answers, I think the acronyms were derived to show a scale between the two terms to distinguish how reliable transactions or requests where between RDMS versus Big Data.

为了补充其他答案,我认为这些首字母缩略词是为了显示这两个术语之间的比例,以区分 RDMS 与大数据之间的事务或请求的可靠性。

From this article acid vs base

从这篇文章酸与碱

In Chemistry, pH measures the relative basicity and acidity of an aqueous (solvent in water) solution. The pH scale extends from 0 (highly acidic substances such as battery acid) to 14 (highly alkaline substances like lie); pure water at 77° F (25° C) has a pH of 7 and is neutral.

Data engineers have cleverly borrowed acid vs base from chemists and created acronyms that while not exact in their meanings, are still apt representations of what is happening within a given database system when discussing the reliability of transaction processing.

在化学中,pH 测量水溶液(水中的溶剂)的相对碱度和酸度。pH 值范围从 0(强酸性物质,如电池酸)到 14(强碱性物质,如谎言);77° F (25° C) 的纯水的 pH 值为 7,呈中性。

数据工程师巧妙地从化学家那里借用了酸与碱,并创建了首字母缩略词,虽然其含义不准确,但在讨论事务处理的可靠性时,仍能恰当地表示给定数据库系统中正在发生的事情。

One other point, since I work with Big Data using Elasticsearch. To clarify, an instance of Elasticsearch is a node and a group of nodes form a cluster.

还有一点,因为我使用 Elasticsearch 处理大数据。澄清一下,Elasticsearch 的一个实例是一个节点,一组节点形成一个集群。

To me from a practical standpoint, BA (Basically Available), in this context, has the idea of multiple master nodes to handle the Elasticsearch cluster and it's operations.

对我来说,从实际的角度来看,BA(基本可用)在这种情况下具有多个主节点来处理 Elasticsearch 集群及其操作的想法。

If you have 3 master nodes and the currently directing master node goes down, the system stays up, albeit in a less efficient state, and another master node takes its place as the main directing master node. If two master nodes go down, the system still stays up and the last master node takes over.

如果您有 3 个主节点并且当前的指挥主节点出现故障,系统会保持运行状态,尽管处于较低效率的状态,并且另一个主节点将取代其作为主要的指挥主节点。如果两个主节点宕机,系统仍然保持运行,最后一个主节点接管。

回答by siebenheaven

It could just be because ACID is one set of properties that substances show( in Chemistry) and BASE is a complement set of them.So it could be just to show the contrast between the two that the acronym was made up and then 'Basically Available Soft State Eventual Consistency' was decided as it's full-form.

这可能只是因为 ACID 是物质显示的一组属性(在化学中),而 BASE 是它们的补充集。 “软状态最终一致性”是完整形式的决定。