LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2024, 04:45 AM   #1
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,312
Blog Entries: 3

Rep: Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722
BerkeleyDB replacement?


During the time since I last checked, Oracle seems to have killed off BerkeleyDB. What, if anything, would be a comparable substitute?

I'd prefer something smallish and ideally with Perl support, but Python would also be acceptable.
 
Old 01-19-2024, 05:52 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
not Sqlite then?
 
Old 01-19-2024, 06:30 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,312

Original Poster
Blog Entries: 3

Rep: Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722
Correct. SQLite is an SQL database and arranges the data in 2D arrays (tables) but BerkeleyDB is a key-value database and thus a different animal. I was hoping there would be a fork of BerkelyDB hiding somewhere or something similar yet packaged for APT.

YottaDB could be an alternative, it is a key-value database, but there is not an APT package for it. I myself can install it no problem but those I would hand off to would not enjoy an unpackaged db. Maybe that's on them though.
 
Old 01-19-2024, 07:03 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,603

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546

I'm not familiar with BerkeleyDB, but when I want non-relational key-value stuff I'll usually go with either a simple ini file or with Redis - there's a handful of Perl libraries.

(It also happens to be the first response to searching key value perl, which might provide other candidates if Redis isn't suitable for whatever reason.)


Last edited by boughtonp; 01-19-2024 at 07:05 AM.
 
1 members found this post helpful.
Old 01-19-2024, 07:18 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
I have libdb5.3 - Berkeley v5.3 Database Libraries
On my Mint Ubuntu based repo still.
 
1 members found this post helpful.
Old 01-19-2024, 07:23 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,865
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
https://en.m.wikipedia.org/wiki/Ligh...apped_Database
 
1 members found this post helpful.
Old 01-19-2024, 07:24 AM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,312

Original Poster
Blog Entries: 3

Rep: Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722
Quote:
Originally Posted by bigearsbilly View Post
I have libdb5.3 - Berkeley v5.3 Database Libraries
On my Mint Ubuntu based repo still.
Thanks. It seems I missed that. That's a relief.

Though there is less pressure, I am still curious as to what other key-value databases are readily available.
 
Old 01-20-2024, 09:57 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
“BerkleyDB” is basically what we old-schoolers would refer to as “ISAM = Indexed Sequential Access Method.” It provided only the primitive ability to find a single record based on a single key.

If you are still encountering such software in service, it is time to rewrite it. And “SQLite” is now the appropriate solution. You can implement the remedy “a step at a time.”

Last edited by sundialsvcs; 01-20-2024 at 09:59 AM.
 
Old 02-10-2024, 04:17 AM   #10
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,312

Original Poster
Blog Entries: 3

Rep: Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722
Thanks all.

After looking around, including at my own scripts, I guess the answer for most use-cases will be SQLite.

For other situations, such as nested comment hierarchies and controlled vocabulary taxonomies, something else is probably better. Though by making convoluted queries one can force a hierarchy from a table.
 
Old 02-10-2024, 08:42 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
You can certainly use an SQL table to create the "ISAM" model. You don't make direct calls to low-level subroutines. Instead, you submit a query, and SQLite does the hard work for you. It has a "very solid" shared-file implementation that works on and across all platforms, and "it just works." You will find that your replacement code is much simpler than what Berkely required.

Bear in mind that: "transactions" are very important when working with SQLite. This is what will give you the "'lazy' read/write" behavior that you are probably used to. Without it, SQLite will physically commit every write – waiting for it to complete – and will not "buffer" anything when reading. The result is much slower performance than you might otherwise expect. But, it is designed that way. (Most database interfaces provide a convenient "auto-transactions" feature. Use it.) When you do the right thing the right way, SQLite is a speed demon.

Last edited by sundialsvcs; 02-10-2024 at 08:46 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BerkeleyDB installation howto wilu Linux - Software 1 01-30-2005 02:48 PM
kdevelop+BerkeleyDB and path issues mimithebrain Mandriva 0 08-06-2004 05:29 PM
What should I install compile first MySQL or BerkeleyDB? fleeingduck Linux - Newbie 1 05-28-2004 05:36 PM
Dsniff can't find BerkeleyDB cktl50 Linux - General 1 08-04-2003 10:02 PM
BerkeleyDB Dilemma ? AutoBot Linux - General 9 06-02-2002 08:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration