Import from Database Schema
From Taylor
This feature allows you to generate an EJB3/Portlet application from an existing database.
- Download and install the net.taylor.mda.reverse plugin
- Setup a Project per usual
- Select File/Import
- Select Taylor/Import DB Schema to UML Model and press Next
- Fill in parameters and press Finish
- New Model File Name and location (make sure to include the .uml file extension)
- JDBC Driver Jar
- Driver Class Name (e.g. org.gjt.mm.mysql.Driver)
- Database URL
- jdbc:mysql://localhost/taylor-tracker?user=admin&password=admin
- jdbc:oracle:<drivertype>:<username/password>@<database>
- jdbc:postgresql://localhost:port/database?user=fred&password=secret
- Schema Name
- Expand created model in Model Navigator
- Right-click on a package and select New Class Diagram
- Right-click on the created diagram and select Arrange All
- Tweak model as needed, such as
- change model name
- change package name
- change class and property names, but leave Table and Column stereotypes as is
- change associations, for example
- reverse a 'One to Many' to a 'Many to One'
- hide a 'Many to Many' association table with a 'Many to Many' associations
- add inheritance
- create DAO services with CRUD operations
- Generate code and unit test and package per usual
- NOTE: This feature has only been tested with MySQL, but was designed to work with any JDBC driver.




