working API for database mgmt