Implements saveDB