create a base class for generic table