The Database plugin can be used to automate the starting of a database, creating and droping table as well as adding and deleting data.
For usage see the plugin info page.