A de minimis incentive was given to thank the reviewer for their time. The incentive was not used to bias or drive a particular response, nor was the incentive contingent on a positive endorsement. More Info
Verified User
Employee in Information Technology (1001-5000 employees employees)
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
A de minimis incentive was given to thank the reviewer for their time. The incentive was not used to bias or drive a particular response, nor was the incentive contingent on a positive endorsement. More Info
Verified User
Employee in Information Technology (1-10 employees employees)
Pros
Can run as an in-memory database.
Simple and quick to get started with, and is light weight (only 2MB).
SQL compliant so it compatible with most relational databases.
Cons
There really is not a lot to say here as H2 Database Engine is not a general purpose database such as PostgreSQL or MySQL, so it has a niche use case for being an in-memory database, and it is very good at doing that. Perhaps one slight improvement would be some SQL queries that work with MySQL or PostgreSQL do not work with H2 Database Engine, and so if H2 Database Engine is used as an in-memory replacement for testing, that would create false negatives.
If H2 Database Engine can support some NoSQL databases, it would be fantastic.
Most Important Features
Light weight and in-memory
SQL compliant
Return on Investment
Improved code quality by allowing the team to run automated test cases.
Reduced infrastructure cost as we no longer need to have dedicated databases just for testing.