eralchemy icon indicating copy to clipboard operation
eralchemy copied to clipboard

broken renderings for larger databases.

Open baranabi opened this issue 7 years ago • 2 comments

I have tried out this software on a pair of large open datasets, the eICU Collaborative Research Database, and the MIMIC-III.

Though access to the data itself must be requested along with completion of a brief online certification, the descriptions of the tables and the columns they comprise are openly available, so the attached images do not reveal any sensitive information.

The structure/relationships of their tables and columns are described on their respective websites, http://eicu-crd.mit.edu/ and https://mimic.physionet.org/.

We host these datasets as postgresql databases, and are now attempting to use eralchemy to generate ER diagrams for them. We use the command line route, eralchemy -i <dburl> -s <schema> -o <output.png>

Below I have attached eralchemy renderings of both databases. Though the rendering is technically correct, in terms of displaying table columns and relationships of foreign keys, the image is unusable.

Problems:

  • Image is very tall, and very thin.
  • Edges from tables with foreign keys do not go to the table they refer to, but to a text label of the table name located far away from the actual table image. A good example of this is in the EICU image is the patient table with a foreign key to the hospital table having an edge that just goes to the label hospital slightly to the left, and then several other tables that refer to the patient table having their edges go toward a patient label right next to the representation of the hospital table. Also can be seen in MIMIC , how the edges for foreign keys all direct to disembodied table names rather than to the tables themselves.
  • Labels often overlap, as can be seen how the 0..N labels overlap eachother in the EICU render, obscuring the patient tablename.

A thought I had is that this could possibly stem from schema handling, as all the tables in both datasets belong to a schema. The rendered tables have the full schemaname.tablename format, however the bodiless labels that the edges point to only have the tablename. Maybe it is pointing to a label, and not the table as it cant recognize that schemaname.tablename refers to the same thing as tablename. I am still reading through the source code, so I am not too familiar with the mechanics quite yet.

Though the data itself is not available without being granted access, code for creating the databases themselves, ergo that which is necessary for eralchemy to generate an ER diagram is available on the datasets' respective repositories at

  • https://github.com/MIT-LCP/eicu-code
  • https://github.com/MIT-LCP/mimic-code

which should come in handy for reproducing the issue.

I am also available to cooperate and collaborate to resolve this issue.

EICU

eicu

MIMIC

mimic

baranabi avatar Jan 03 '18 23:01 baranabi

It's a problem with graphviz.

Did you try exporting to PDF?

Alexis-benoist avatar Jan 07 '18 14:01 Alexis-benoist

Yes, the PDFs look the same.

baranabi avatar Jan 10 '18 02:01 baranabi