moving db to rootScope; renaming view2 -> transaction