DB code OO and separate file