server: added classes for DB managment and a wrapper for items in db and jobs