Persists resources to the database - first wipes out all resources, then writes them back in from the ResourceSet