Added a database reading api.