Bug 98150 - Allow saving a relationship model as a separate file
Summary: Allow saving a relationship model as a separate file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Tables
  Show dependency treegraph
 
Reported: 2016-02-24 18:21 UTC by Stéphane Aulery
Modified: 2018-08-14 21:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Aulery 2016-02-24 18:21:26 UTC
From: Axel Stammler <axst@users.sourceforge.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libreoffice-base: please allow saving a relationship model as a separate file
Date: Fri, 03 Oct 2014 12:32:37 +0200

Package: libreoffice-base
Version: 1:3.5.4+dfsg2-0+deb7u2
Severity: wishlist

Dear Maintainer,

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.
Comment 1 raal 2016-03-06 10:16:42 UTC
setting to new.
Comment 2 Gisbert 2018-08-13 18:26:31 UTC
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...
Comment 3 Drew Jensen 2018-08-14 21:32:15 UTC
(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.