In: Computer Science
Draw the corresponding ERD for the following Employee Database:
Employee (emp_id, first_name, middle_name, last_name, date_of_birth)
Dept (Dept_id, Dept_name, Building)
works (emp_id, dept_id, hours)
Emp_phone (emp_id, phone_num)
Note:
Please I need a short answer only on paragraph and simple words.
Solution:
As per your requirement I have designed E-R Diagram for the employee database, below I have discussed all.
Above we have created an entity of employee, works, dept, emp_phone - Entity means anything which has some values in it or some characteristics.
Next inside the bracket we have attributes for the entity, attributes means some value related to entity, as an example we can say (dept_id) is an attribute of dept entity. As we as an entity has our name,mobile_number as an attributes which describes the entity.
Next you can see emp_id (attribute) is present in works and emp_phone it means employee entity is having more than one relation as it is present in other 2 entities also. So it is called as one to many relationship.
By help of E-R diagram we are able to read which entity is connected to which entity and what attributes does the entity holds.