Getting the plugin to talk to the database