According to CAP-theorem, in databases, it is impossible to simultaneously achieve consistent, availability and partition tolerance. why does Berkeley DB stand in CP in the CAP theorem? Why Berkeley DB does not support Availability? I could not find any information about CAP theorem in Berkeley DB. Where can I get information about it?
Asked
Active
Viewed 152 times
0
-
2**BerkeleyDB isn’t a distributed database**. It’s an in-proc (embedded) database. The CAP theorem doesn’t apply. You could build a distributed system on-top of BerkeleyDB, of course - which then makes the CAP theorem your problem, not BerkeleyDB’s. – Dai May 27 '20 at 00:34
-
You edited your post - but your edit is wrong. The CAP theorem only applies to distributed data stores (distributed databases), not all classes of databases in general - nor does it apply to single-node stores - and as I wrote above, BerkeleyDB is not a distributed database. – Dai May 27 '20 at 00:38
-
I do not agree on your opinion regarding "The CAP theorem doesn’t apply." https://books.google.de/books?id=uEgTfiURlcQC&pg=PT115&lpg=PT115&dq=key+store+CAP-theorem,+Berkeley+DB&source=bl&ots=vcp5GWb9pX&sig=ACfU3U2CA1VrG36nbPLpYcPAM7hvy34xLg&hl=en&sa=X&ved=2ahUKEwigrK6H6NLpAhUUuHEKHYwWBNYQ6AEwBnoECAkQAQ#v=onepage&q=key%20store%20CAP-theorem%2C%20Berkeley%20DB&f=false – Khasan Berdiev May 27 '20 at 00:46
-
1That book lists BerkeleyDB as an example of a Key-Value "NoSQL" database with built-in support for Consistency - but that's irrelevant because BerkeleyDB isn't distributed. The author of that book made a mistake by referring to it, in my opinion - though the author does mention that BerkeleyDB does not support the "A" (Availability) in "CAP" - which is correct: because BerkeleyDB is not distributed, so there's no concept of "availability". The same point can be used with MS Access (JET Red) or even an Excel spreadsheet file (when opened with Excel's ODBC or OLE-DB driver when using locking). – Dai May 27 '20 at 01:01
-
2@Dai is absolutely correct. BDB isn't distributed, so CAP doesn't apply. To put it another way: all BDB's data is stored in the same place. There's no partition tolerance because there's only a single partition. Availability is your own responsibility. – Mike Andrews May 28 '20 at 21:24