database and transform member data to hash