Skip to content

Connect to Your Database

Per-Åke Minborg edited this page May 15, 2018 · 8 revisions

In the previous guide Installing Speedment, we showed you how to set up your pom.xml using our Initializer. If you have completed the previous steps you are ready to connect to your database.

Supported Databases

The Open Source version supports the following Open Source database managers:

  • MariaDB
  • MySQL
  • PostgreSQL

For Enterprise database connectors such as Oracle, SQL Server, DB2, AS400 etc. see www.speedment.com.

Connect to Your Database

Speedment uses JSON configuration files to generate Java code from your database. The JSON files will be created using the Speedment Tool. This is launched simply by calling mvn speedment:tool in the same directory as your pom.xml or by clicking it in your IDE.

Maven targets

Once started, use the Tool to connect to your database.

Speedment now analyses the underlying data sources’ metadata and automatically creates code which directly reflects the structure (i.e. the “domain model”) of the underlying data sources. All it takes is a simple press on the Generate-button.

Done! Speedment has generated models for every table in the database! You can now open your IDE and start coding. You can always go back to the Tool to further configure the generation.

What's Next?

Now when you have a project up and running, you can start with some of the basic API examples, or, you can do the Hello Speedment tutorial!