[Bioperl-l] BerkeleyDB

Fields, Christopher J cjfields at illinois.edu
Sun Jan 27 21:25:48 UTC 2019


On January 27, 2019 at 2:29:58 PM, Gordon Haverland (ghaverla at materialisations.com<mailto:ghaverla at materialisations.com>) wrote:
On Sun, 27 Jan 2019 18:54:53 +0000
"Fields, Christopher J" <cjfields at illinois.edu> wrote:

> Yes, that’s what I was thinking. You should be able to simply tie
> back into the same file and reuse the btree.

Quite a while ago, I was working with DBM::Deep, and developed a fair
complex Perl structure. The ability to store this to file (which is
what DBM::Deep did originally) or dbase (still a work in progress?)
apparently isn't trivial.

Duplicating parts of the structure could use a shallow copy, a deep
copy, or sometimes you would have to write a custom subroutine to do
what you wanted.

If you wanted to change the structure, you had to get a deep copy of
what was "in the file" into memory, make the changes, and then copy
this new structure on top of the original location, and then save to
file again.

The levels of autovivification that Perl could do, often influenced how
you altered the structure.

None of which is about BerkeleyDB. But I believe in the reading I was
doing around this work, that the reason a lot of this had to be done,
was because of the "tie" interface, and/or what was available for
serializing Perl structures. Which may crop up in this application
(maybe).

Which is why I brought up DBM::Deep.

I had worked with MLDBM before DBM::Deep, on related things.

Gord

There is some code for storing more complex data in BerkeleyDB buried several places in BioPerl. For example Lincoln had a backend using if for his Bio::DB::SeqFeature::Store implementation.

chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/bioperl-l/attachments/20190127/27370def/attachment.html>


More information about the Bioperl-l mailing list