Saving and loading dependencies from a DB