add api and db to compass-core

Change-Id: Ic5219943f52848b4e8554023bce21fa1588b27a6