From: Axel Stammler <email@example.com>
To: Debian Bug Tracking System <firstname.lastname@example.org>
Subject: libreoffice-base: please allow saving a relationship model as a separate file
Date: Fri, 03 Oct 2014 12:32:37 +0200
the relationship window is a great tool, thank you! There must be some internal format for
reverse-engineered or newly created relationship models. Please consider offering a way of
serialising these models so that they can be reloaded without access to the same database
connection or even with a different database connection open, thus facilitating an
important step in a migration process, e.g. from My SQL to Postgres.
setting to new.
Dear Maintainer, I wonder if anybody knows WHERE and in which FORMAT the Relationship Diagram is stored.
After renaming my .odb-file to .zip and extracting it, I cound not find anything like the definition of a diagram...
(In reply to Gisbert from comment #2)
> Dear Maintainer, I wonder if anybody knows WHERE and in which FORMAT the
> Relationship Diagram is stored.
> After renaming my .odb-file to .zip and extracting it, I cound not find
> anything like the definition of a diagram...
In the case of an embedded HSQL base file there are two places that hold information. First the description of the relationships can be found in the file (inside the odb) database/script the information is the foreign key declarations. That is the set of DDL commands to recreate the user schema.
To find the associated real indexs created from that statement in the system generated index names are found, along with all the other information, in the system schema tables in the binary data file. (also in the backup file, so three places I suppose ;)
Anyway, just grabbing the database/script file for these type odb files and there are schema tools where importing (with a little edit here and there) works successfully.
There may be a setting in content.xml also, IIRC there is, but that is only to override the default behavior and to show tables without an FKs in the display. (So you used the add table dialog but then didn't actually use it yet). In the more powerful external tools the default (that I'm use to) would be to show you all the tables in the schema anyway.
Honestly though I'm surprised no one has published an extension which doesn't either let you grab that as an image or maybe create a draw file with layout similar to the relationship window.
Also, there is a tool coming out from a community member 'any time now' ;) soon, I think, that might do some of (and more) of what you want. So keep eye out for something called, 'Database Documenter' I think that is the name.