If you need to generate an ER diagram for a schema, here is how to do it:
One time install
Install AmaterasERD on Eclipse 3.5 (must also do AmaterasUML)
- Make sure you have GEF installed
- Download the AmaterasUML plugin JAR file from the project home
- Copy it into your ECLIPSE_HOME/dropins folder (not your plugins folder!)
- Download the AmaterasERD plugin JAR file from the project home
- Copy it into your ECLIPSE_HOME/dropins folder (not your plugins folder!)
- Restart
Generate the Diagram
Do this each time you want to render a schema:
- In Eclipse, New->Other->AmaterasERD->ER Diagram
- Give it a name, make sure dialect is PostgreSQL
- Settings:
- JAR file - find the location as directed below
- Driver, URI, User, Password, Schema as directed below
- Make sure there are no spaces after the text in each box. It will foul up the works.
- Click the Load Tables button, you should see a list of your tables
- Make sure to select the tables in the list box! It will only draw the tables that are selected.
- Click Finish
- Right click on your crowded diagram and choose Auto Layout
- Manually finish moving things around to make it readable.
- Export the diagram:
- Right click and choose Save as Image, or
- Right click, Export->HTML
For Reference: PostgreSQL JDBC
Above, there were a couple of things you needed to specify for setting up the JDBC.
First, you have to have a JDBC Driver JAR file. If you don’t already have one, you can download one here. Put it in a safe spot on the filesystem, not in a temporary directory. In the JDBC settings dialog, you will need to locate this JAR file.
Second you will need to specify your connection settings. They should be something like for a localhost database:
- Driver: org.postgresql.Driver
- DB: mygreatdb
- URL: jdbc:postgresql:mygreatdb
- User: myschemauser
- Password: rockout
- Schema: public