process of converting er diagram to tables