Added database functionality api