views:

133

answers:

1

I am looking for a tool to help in designing and implementing database and entities for a Java project. Probably we are using JPA or direct Hibernate. The features I look for are:

  • Design database with visual modeller
  • Create entities from the visual model
  • Update entity changes to the visual model
  • Import existing database schema as visual model / entity classes

So the idea is to originally create a database model with visual tool, then auto-to generate entities from it and afterwards modify the code and expect the visual diagram to reflect the changes (so it works for documentation purposes). I want a full representation of table schema, not just an ER diagram.

There have been other questions (of course) but they don't seem to be so specific to Java/JPA and don't have as strict requirements. They are also often just about generating a diagram from code or database schema - they don't require bi-directional support (if that's the right term).

The products I found so far are:

  • NetBeans (6.7.1): supports generating Java classes from UML, JPA needs specific templates (sounds too tricky). Doesn't identify new elements from classes.
  • DbSchema: Seems to offer some visualization of schemas, couldn't get it started so can't say much. Commercial, but it also has a free version.
  • Omondo EclipseUML: seems to have some sort of support, but costs like hell.
  • SchemaSpy: Supports only creating documentation from an existing database schema. Also couldn't find a comprehensive graph.
  • Toad Data Modeller: Somewhat messy homepage, however seems to support creating diagrams from existing DB as well as creating DB schema from a diagram. Doesn't have code generation facilities.
  • Eclipse WTP's Dali JPA Tools: No support for visual presentation, however targeted at providing aid to JPA development.

As a conclusion, Dali seems most interesting, because it's targeted for JPA development. However, it doesn't seem to have a visual diagram of any sort (just outlines and stuff).

Any suggestions?

+2  A: 

Have a look at th JPA Diagram Editor for Eclipse, the first Milestone has been released recently. From the announcement:

I am happy to announce that the JPA Diagram Editor project made its first milestone release - 0.5 RC1. Just follow the installation instructions, posted on the project’s wiki, and you are ready to build your JPA model in a diagram. There is a nice Getting Started tutorial to help your first steps. If you want to take a quick look before installing, then check our demo on YouTube.

An example of a diagram created by the JPA editor

The JPA Diagram Editor is a new incubating project in the WTP Incubator. The project is initiated by SAP and aims to contribute the existing JPA Diagram Editor from the SAP NetWeaver Developer Studio, and continue its future development in the Eclipse community. This contribution is based on the Graphiti project - the new graphics modeling infrastructure in Eclipse.

The official 0.5 version of the project will provide a stable release of the initial contribution. Due to the migration to Graphiti, there are some bugs to be cleaned and we are actively working on them. Nevertheless, we decided to release early to hear your feedback sooner. If you eventually find a bug, then please report it in the WTP Incubator Bugzilla (use component wtp.inc.jpaeditor). You can check the list of already reported bugs if that bug has already been found - we are actively testing at the moment.

Please, note that currently the JPA Diagram Editor supports only JPA 1.0 projects. This mean that you will not see the “Open Diagram” action in the context menu of JPA 2.0 projects. JPA 2.0 support is definitely on our radar screen. We will start working on it after releasing the stable 0.5 version.

Pascal Thivent
This looks really promising (installing atm), just what I was looking for. Too bad it's not "complete" yet and is probably shaky and buggy. I really like the integration with Dali JPA tools. This should be perfect... however, as it isn't too mature quite yet, I will gladly hear from other choices as well :)
Tuukka Mustonen
@Tuukka Yes, it's very new and might not be that mature. But I wanted at least to mention it (since it's new).
Pascal Thivent
For anyone interested, I tried out the product. It is still in a rather basic level, however supports the basic CRUD operations on entities and their properties. It also looks specific enough (to JPA/Java) to actually aid in the development/documentation. Also, other data modeling products often reflect the database itself, however, this product lives at the code level and actually reflects the entities. After all, what do you do with a database table/column that is not used in the code... I'm not deeply into Dali JPA tools, but probably database can be reflected with this as well.
Tuukka Mustonen