Add db backend to support metadata-repository

Implements-partly blueprint metadata-repository-db-backend
Change-Id: Ibd8943082f378f720a805fd40a28ca9847292666