java 带有可视化图表的 JPA 数据库建模器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3581940/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Database modeller for JPA with visual diagrams
提问by Tuukka Mustonen
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:
我正在寻找一种工具来帮助设计和实现 Java 项目的数据库和实体。可能我们正在使用 JPA 或直接 Hibernate。我寻找的功能是:
- 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.
所以这个想法最初是用可视化工具创建一个数据库模型,然后自动从中生成实体,然后修改代码并期望可视化图反映更改(因此它适用于文档目的)。我想要表模式的完整表示,而不仅仅是 ER 图。
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).
还有其他问题(当然),但它们似乎不是针对 Java/JPA 的,也没有那么严格的要求。它们通常也只是从代码或数据库模式生成图表 - 它们不需要双向支持(如果这是正确的术语)。
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 seemsto 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.
- NetBeans(6.7.1):支持从 UML 生成 Java 类,JPA 需要特定的模板(听起来太棘手)。不从类中识别新元素。
- DbSchema:似乎提供了一些模式的可视化,无法开始,所以不能说太多。商业版,但它也有免费版本。
- Omondo EclipseUML:似乎有
某种支持,但成本很高。 - SchemaSpy:仅支持从现有数据库模式创建文档。也找不到全面的图表。
- Toad Data Modeller:有点凌乱的主页,但是似乎支持从现有数据库创建图表以及从图表创建数据库模式。没有代码生成工具。
- Eclipse WTP的Dali JPA 工具:不支持可视化呈现,但旨在为 JPA 开发提供帮助。
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).
总而言之,Dali 似乎最有趣,因为它是针对 JPA 开发的。但是,它似乎没有任何形式的可视化图表(只有轮廓和内容)。
Any suggestions?
有什么建议?
采纳答案by Pascal Thivent
Have a look at th JPA Diagram Editorfor Eclipse, the first Milestone has been released recently. From the announcement:
看看Eclipse 的JPA 图表编辑器,最近发布了第一个里程碑。从公告:
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 demoon YouTube.
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.
我很高兴地宣布 JPA Diagram Editor 项目发布了它的第一个里程碑版本 - 0.5 RC1。只需按照项目 wiki上发布的安装说明进行操作, 您就可以在图表中构建 JPA 模型了。有一个很好的入门教程可以帮助您迈出第一步。如果您想在安装前快速浏览一下,请查看我们 在 YouTube 上的演示。
JPA Diagram Editor 是 WTP Incubator 中的一个新的孵化项目。该项目由 SAP 发起,旨在贡献来自 SAP NetWeaver Developer Studio 的现有 JPA Diagram Editor,并在 Eclipse 社区中继续其未来的发展。此贡献基于 Graphiti 项目 - Eclipse 中的新图形建模基础架构。
该项目的官方 0.5 版本将提供初始贡献的稳定版本。由于迁移到 Graphiti,有一些错误需要清理,我们正在积极解决这些问题。尽管如此,我们还是决定提前发布,以尽快听取您的反馈。如果您最终发现了错误,请在 WTP 孵化器 Bugzilla 中报告(使用组件 wtp.inc.jpaeditor)。如果已经发现该错误,您可以检查已报告的错误列表 - 我们目前正在积极测试。
请注意,目前 JPA 图表编辑器仅支持 JPA 1.0 项目。这意味着您不会在 JPA 2.0 项目的上下文菜单中看到“打开图表”操作。JPA 2.0 支持绝对在我们的雷达屏幕上。我们将在发布稳定的 0.5 版本后开始工作。
回答by jGauravGupta
Have a look at the JPA Modeler - Netbeanstool, will be fit for your requirement :
看看JPA Modeler - Netbeans工具,它将适合您的要求:
designing and implementing database and entities for a Java project
为 Java 项目设计和实现数据库和实体
You can find the demo here : JPA Modeler Demo - Youtube. It is released recently and in initial phase.
您可以在此处找到演示:JPA Modeler Demo-Youtube。它最近发布,处于初始阶段。


