refactor methods and other for getSize in DB;