Initiate a relational database with Spring data JPA. Logic of initializing data storage which is common for both JPA and Mongo was decoupled into an abstract class.