added a class for db structure