Storing map in database - main classes and interfaces