er diagram reduction to table