Get table name by entity and by base table name.