Starting database integration and testing

some methods ok