Database Working - Offline and Average Tables