Implement database API for backward sync