229

The BASE acronym is used to describe the properties of certain databases, usually NoSQL databases. It's often referred to as the opposite of 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 lines to the term.

This leaves me with some questions about the definition:

Basically Available, Soft state, Eventual consistency

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

Basically available could 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?

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?

Eventual consistency means 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?

Community
  • 1
  • 1
Niels van der Rest
  • 31,664
  • 16
  • 80
  • 86

6 Answers6

243

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

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

  • Consistency
  • Availability
  • Partition tolerance

A BASE system gives up on consistency.

  • Basically available indicates that the system does guarantee availability, in terms of the CAP theorem.
  • Soft state indicates that the state of the system may change over time, even without input. This is because of the eventual consistency model.
  • Eventual consistency indicates that the system will become consistent over time, given that the system doesn't receive input during that time.

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.

Niels van der Rest
  • 31,664
  • 16
  • 80
  • 86
  • 47
    Basically available does NOT guarantee availability. it means, it is mostly available but the servers might go down for various reasons. – DarthVader Dec 02 '11 at 22:21
  • 1
    @Neils, so does ACID give up availability or patition tolerance? – Pacerier Apr 14 '14 at 15:12
  • 1
    @Pacerier, that's where the CAP theorem starts to show its flaws :) If the system guarantees partition tolerance, it sacrifices the availability in case of a partition. If the system guarantees availability, it gives up on partition tolerance which means that a partition will make the system unavailable (or inconsistent). So you can see that 'availability' and 'partition tolerance' go hand in hand. There's more detail on this in [this article](http://dbmsmusings.blogspot.nl/2010/04/problems-with-cap-and-yahoos-little.html). – Niels van der Rest Apr 14 '14 at 18:29
  • 1
    Unscientifically, but from my observations, when talking about Web Services, ACID is most often associated with SOAP and BASE is more closely affiliated with REST (RESTful) services. And for a more fine-pointed discussion about Eventual consistency, see the debate between MongoDB and CouchDB supporters. – charles ross Nov 20 '15 at 17:43
  • The CAP "theorem" is dissected mathematically (but very readably) and discussed in a uniquely intelligent way [by Mark Burgess](http://markburgess.org/blog_cap.html), whose article I'm in progress reading. (I was linked there in the first place [by Wikipedia](https://en.wikipedia.org/wiki/CAP_theorem#cite_note-Burgess-7).) – Wildcard Mar 28 '16 at 20:26
  • @DarthVader Can you explain your point please. I don't get into this. thanks :D – hqt Dec 31 '17 at 14:30
  • @hqt stolen from http://www.dataversity.net/acid-vs-base-the-shifting-ph-of-database-transaction-processing/: "[...] There will be a response to any request. But, that response could still be "failure" to obtain the requested data or the data may be in an inconsistent or changing state" – momo Aug 13 '18 at 07:04
  • 1
    @charlesross Chemically, soaps are conjugate bases of fatty acids. Perhaps programmers should not use concepts of sciences they don't understand – Juan Perez Jun 19 '23 at 13:16
49

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 will get married).

Mau
  • 14,234
  • 2
  • 31
  • 52
  • Ok, so you are saying ACID databases is much better than BASE? – Pacerier Apr 14 '14 at 15:14
  • 2
    Au contraire, BASE is always more fun. – Mau Apr 14 '14 at 15:48
  • Hm, so if you need to build a serious financial application, which would you choose? – Pacerier Apr 14 '14 at 19:02
  • 10
    Well, that's actually my daily bread and if you want a serious answer, ACID. – Mau Apr 14 '14 at 19:07
  • 1
    @Pacerier Eric Brewer ho coined the term BASE, indicates that while banks and financial institutions talk about ACID constraints, in reality, they are not strictly speaking (http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on-why-banks-are-base-not-acid-availability.html) – andand Apr 22 '14 at 20:13
  • 2
    @Pacerier and Mau, what about NewSQL? Would you choose it over NoSQL(BASE) and relational(ACID)? – Boris Mocialov May 01 '15 at 17:59
12
  • 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.

Pang
  • 9,564
  • 146
  • 81
  • 122
6

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.

BASE stands for -

  • 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.

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.

Pujan
  • 3,154
  • 3
  • 38
  • 52
  • 3
    Eventual Consistency actually have undesired impact. Have you ever experienced LinkedIn chat slowdown. You reply with one sentence, and then reply with another. Then due to Eventual Consistency, or lack of proper implementation of thereof, you end up with your two replies switched together. Yes, you got 2 replies in the chat in the end, but they are not in the intended order. – zmechanic Feb 21 '20 at 11:47
5

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.

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.

One other point, since I having been working with Big Data using Elasticsearch it would help if I explained how it is structured. An instance of Elasticsearch is a node and a group of nodes form a cluster.

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.

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.

James Drinkard
  • 15,342
  • 16
  • 114
  • 137
  • 1
    Thanks for giving more details in terms standing behind acronyms. Probably you have typo and meant `lYe`. It was confusing for me, but I'm not a native speaker and do not have PhD in Chemistry, so I can be wrong :) – Rvach.Flyver May 14 '21 at 07:40
  • No, it was poorly worded. Hopefully my edit helps. – James Drinkard May 14 '21 at 14:38
0

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.

siebenheaven
  • 39
  • 1
  • 5
  • 3
    That may explain how the acronym came to exist, but is does not explain what the various properties _mean_. – Jmb Dec 08 '17 at 15:51
  • 1
    The use of words such as 'Basically' which aren't even significant in terms of meaning they bring in suggests that the acronym was chosen first (ACID vs BASE)and then the words were found to sort of fill in the parts of the acronym. That's probably why we don't find as many explanations and references (compared to the words from ACID,explanation of which you can find in every page that talks about RDBMS) to what these words mean . – siebenheaven Dec 13 '17 at 13:01
  • I find this interestingly correct, since "Basically Available" does seem so forced. – Ricardo Pedroni May 29 '20 at 14:53