The uml-data-model-processor project provides automation tools for designing and implementing databases based on UML diagrams created using the PlantUML format. Its goal is to reduce routine work for developers by automatically generating essential artifacts such as DDL scripts and POJO class templates.
When developing applications, it's common to need to construct a data model through domain analysis (Information Engineering Diagram). Developers manually create database tables and POJO classes, which takes time and resources. The tool helps speed up this process by providing high-quality base infrastructure for further system deployment.
- Automatically generates SQL queries (using SQL Data Definition Language, DDL) for creating database tables based on given UML diagrams from PlantUML.
- Creates initial Java POJO classes suitable for integration with standards like JDBC or JPA.
The application accepts PlantUML files (.pu, .puml, .txt) and converts them into ready-to-use SQL scripts and POJO classes. You’ll need basic knowledge of UML syntax to prepare valid diagrams. We recommend validating your diagrams beforehand using the online PlantUML Web Server.
- Time and effort savings for development teams due to automated artifact generation.
- Reduced human errors related to manual preparation of queries and classes.
- Quick prototyping capabilities allowing rapid iteration over database structures without rewriting large amounts of code.
Since the project is at the MVP stage, currently implemented features include:
- Simple SQL statements for DDL creation resulting in a
schema.sqlfile, compatible with frameworks like Spring Data JDBC. - Varied POJO class configurations:
- One-to-one mapping between UML models and POJO attributes (each attribute corresponds directly to a table column).
- Representation of foreign keys as full object references (embedded entities) rather than simple identifiers.
- Support for Spring Data JDBC-specific annotations (
@Table,@Id,@Column) and types such as AggregateReference.
- Handling of one-to-one, one-to-many, many-to-many relationships (via join tables).
Future improvements aim to expand functionality, enhance generation quality, and integrate popular frameworks ( see Supported Technologies).
Before starting, ensure you have:
- JDK version 8+ installed.
- Apache Maven available.
Interaction with the generator is done via a Maven plugin. For more details on configuring the plugin, refer to the documentation page for uml-data-model-processor-maven-plugin.
For detailed examples of SQL and POJO class generation, see the gym-box-example project.
Currently supported technologies include:
- Databases: MySQL,
PostgreSQL,SQLite. - Programming languages: Java 11+,
Kotlin. - Build systems: Maven,
Gradle. - Frameworks: Spring Data JDBC,
Spring Data JPA,Hibernate,Kotlin Exposed,etc. - Database migration management: Spring Data JDBC (automatically executes schema.sql),
Liquibase.
🥷
strikethrough technologiesindicate planned future developments
🙌 Your contributions are welcome!
🗣 To discuss ideas and suggestions, please submit issues on GitHub repository.
⭐ Please star the project if you find it useful!
🤝 Support open-source projects!