extract database functions into a dbManager class in model
added:
dbManager.h
dbManager.m