Initial Version of the database api.

Change-Id: I47c8575abfa80ffbc90bf356b7d177aba4e0f54a