new class MattEntity

this is the main MAT class for working with database