Finalizing db model and REST api interface.