Re: Merge question

"Frédéric Gobry" <[email protected]> Wed, 25 Apr 2007 08:01:27 +0100
Newsgroups gmane.comp.gnome.apps.pybliographer
Message-ID <[email protected]>
> Let's say that I have a file in a standard bibtex format, and I have
> another in, say, crossref format. How can I read those both into a
> single bsddb database?
>
> Do I need two Database objects? Can I use a single Store for both? Do I
> need to use an Adaptor? What will the resulting bsddb schema be?

You cannot have a db holding multiple schemas (though it might be
useful to _extend_ a db, for instance with annotations, this is not
supported for the moment). So, if your target is bibtex, you might
create a db with a bibtex schema, use the BibTeX reader on it, then
adapt this same db as your second schema, and use the reader for your
second schema on the adapted version.

> Thanks for any pointers,

Adapters are pretty young, so you might not have the one you would
like. They are pretty simple to implement (though boring), see
Pyblio.Adapters for samples.

Let me know if you run into problems with this.

-- =

Fr=E9d=E9ric

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/