Added the synchronous version of database methods.