Define an entity-relationship diagram, then generate the database creation script, OOP classes, and much more!
You can try ERDiagram online using the ERDiagram playground application. There you will find some code examples that are very useful for learning the ERDiagram language.
There is also a work-in-progress CLI version of ERDiagram. Check it out! 🙂
You can find the installation steps of the library in the Library usage document.
- Clone the repository
git clone https://github.com/nestorrente/erdiagram.git
- Access to the project's directory
cd erdiagram
- Install dependencies
npm install
For running the tests and generating the badges for the README file, you can use the following command:
npm run test
For building the library, you can use the following command:
npm run build
-
ERDiagram language: learn how to define entities and relationships.
-
ERDiagram library: installation, basic concepts, configuration and examples.
-
Entity-relationship model conversion:
- Database model: learn how entities and relationships are modeled as tables and columns.
- Class model: learn how entities and relationships are modeled as OOP classes.
-
Supported output formats:
- Database creation script (SQL):
- MySQL
- Oracle DB
- PostgreSQL
- SQLite
- SQL Server
- OOP classes/interfaces:
- Java (includes Bean Validation and JPA support)
- TypeScript
- Diagram code:
- PlantUML
- Nomnoml
- Database creation script (SQL):
This is a side project I'm working on during my spare time, so I'd be very happy if you want to contribute 😀 bug report, suggestions, pull requests, or any other kind of feedback are really appreciated.
Please contribute using GitHub Flow. Create a branch from the develop
one, add commits, and open a pull request.
Please note we have a code of conduct, please follow it in all your interactions with the project.
If you want to get in touch with the author, you can contact me through LinkedIn or email.
This is a small list of features/tools that I'll be very happy to have:
- More database engines support.
- More OOP languages support.
- ERDiagram language syntax highlight support for popular text editors or IDEs (Sublime Text, Jetbrains, VS Code, ...).
- XSD / JSON schema generation.
- Liquibase files generation.
- Any other cool stuff 😛