Recently, I decided to use embedded MongoDB instead of using H2 SQL based in-memory database for my personal pet project https://github.com/arman-ilyas/FindMyDoctor . However, migration was not as easy as expected.
Initially, I thought that I just need to comment out the dependencies for the H2 and include MongoDB. However, turns out that I was wrong. H2 currently, tightly coupled with the code, and effort to change to MongoDB is larger.
Lessons learned: proper planning has to be done before development starts. Familiarity with the tech does not guarantee the best result, however, proper planning and tech selection give a better result. After all, tech can be learned along the development process especially if the project is small.