For simplicity
Pros
- Simple setup, only needs a dependency added to application & few config lines.
- Quick startup
- Easy to use, existing code for MySQL works with H2 too
Cons
- There's a warning in official FAQ "Is it Reliable?"-section which makes it seem like H2 is not yet a mature product.
- If raw SQL queries are used there maybe be differences between MySQL & H2. ORM library should be used.
- Support seems to be community-based only.
Most Important Features
- Easy setup, developers don't need to setup databases for running tests
- Persistence, although H2 is often referred as in-memory database, saving the database to disk is easy and data stays between application restarts
- MySQL compatibility
Return on Investment
- Doesn't take time from developers, once it's configs are set up for testing it works in everyone's development environments
- Easy to integrate in application, no need to setup separate database software, no maintenance
- No need to deal with infrastructure related issues/costs - database runs in same machine as the application that uses it.
Alternatives Considered
MySQL
Other Software Used
Amazon Relational Database Service (RDS), Apache Tomcat, MySQL