Hi everyone,
I'm currently trying to store / extract a firebird database file (.fdb) into/out of an odb
file (the db will be stored in a temporary file while Base is running) -- I'm somewhat unsure
about where this should be done.
For hsqldb things are done within the SDBC driver itself where the db is fooled to make
it write into the .odb rather than directly to its own file, -- a special url is passed to
HSQLDB to write to the .odb, but this relies on the i/o being overriden to deal with writing
directly to the odb via this url -- this isn't reccomended by the firebird devs, and as far
as I can tell this is what would lead to corruption if a crash happens when the database
file within the .odb is incomplete (I've found a few reports of users where they have had
such corruption happen, no idea how common it is). Admittedly I don't entirely understand
how this driver actually works yet, so I might be missing somethign here.
It looks like one option is to do things in ODatabaseDocument: extract the db when opening an
odb file, and save it into the odb every time we save the odb, however that's a bit inelegant as
the DatabaseDocument shouldn't need to know these details.
It might be possible to do all of this within the driver itself, and then write the complete fdb
from external storage into the .odb as appropriate (transaction committed, etc.), all controlled
by the driver, which seems most sensible to me. (The Storage object is accessible from the driver,
the HSQLDB does so.)
W.r.t. to the location of the extracted firebird db: would an appropriate naming scheme be to have
e.g. ~foo.odb.fdb# for a foo.odb (in the same directory) similarly to the lock files that are
created? (This could also allow for better recovery should we end up with similar corruption
as is apparently happening with HSQLDB if there is a complete separate db.)
Cheers,
Andrzej
Context
- Storing/extracting embedded db within .odb · Andrzej J. R. Hunt
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.