DB API and controller layer