Use new database API