views:

48

answers:

3

Are there are any tools available for use with Postgres so that I can generate UML for the database that I have already created.

A: 

Visual Paradigm has some nice products, check http://www.visual-paradigm.com/ Most of their products work on Linux, OS X and Windows.

Frank Heikens
+1  A: 

You can use dali plugin which is an Eclipse project.

The first step is to add the jdbc driver into your eclipse platform then to connect the database and select generate java code.

The java code which will be generated will include java annotation describing your database. At this stage you need to reverse the generated java code with an UML tool.

The best UML tool is EclipseUML because java annotation are translated into UML stereotype using the omondo Jee/database profile. The association detection is also very very powerful and allows the mapping detection. A really superb feature. You also have the annotation on the getters as well as on attributes. Getters is for the database use and attributes is the UML translation. Both are well done so no loss of information. It means that you have an UML class diagram including all your database information.

EclipseUML is not free which is really painful and also the Helios build is only reserved to paid customer !! As a workaround you can take a previous build for Eclipse 3.3, 3.4 or 3.5 and install it. The 30 days evaluation allows you to reverse your project. No nagscreen, or tags, so if you install it every 30 days on another PC you can use it as long as you want.

A: 

You can adapt this script for MySQL http://askuml.com/blog/list-all-fields-of-all-mysql-db-tables-in-yuml-class-diagrams/ by just changing the driver from Mysql to Postgress found here http://softinnov.org/rebol/pgsql.shtml

This is a sample reverse enginiering for Wordpress DB:

Rebol Tutorial