Update database-related methods to use plugin API's hooks