Create an ER model for each of the following descriptions: (a) Each Company operates four Departments, and each Department belongs to one Company. (b) Each Department in part(a) employs one or more Employees, and each Employee works for one Department with a startdate. (c) Each of the Employees in part (b) may or may not have one or more Dependents, and each Dependent belongs to one Employee. (d) suppose: Company with attributes cnumber, cname, caddress, President. Department with attributes dname, dnumber, location. Employee with attributes ename, ssn(for social security number), Sex, address, salary, birthdate. Dependent with attributes dpName, Sex, birthdate, and relationship (to the employee). (e) Represent all the ER diagrams described in (a), (b), (c) and (d) as a single ER diagram.
1、How to map ….?
Step 1: Mapping of Regular Entity Types.
Step 2: Mapping of Weak Entity Types
Step 3: Mapping of Binary 1:1 Relation Types
Step 4: Mapping of Binary 1:N Relationship Types.
Step 5: Mapping of Binary M:N Relationship Types.
Step 6: Mapping of Multivalued attributes.
Step 7: Mapping of N-ary Relationship Types.
2、For example:
- Create an ER model for each of the following descriptions:
(a) Each Company operates four Departments, and each Department belongs to one Company.
(b) Each Department in part(a) employs one or more Employees, and each Employee works for one Department with a startdate.
(c) Each of the Employees in part (b) may or may not have one or more Dependents, and each Dependent belongs to one Employee.
(d) suppose: Company with attributes cnumber, cname, caddress, President.
Department with attributes dname, dnumber, location.
Employee with attributes ename, ssn(for social security number), Sex, address, salary, birthdate.
Dependent with attributes dpName, Sex, birthdate, and relationship (to the employee).
(e) Represent all the ER diagrams described in (a), (b), (c) and (d) as a single ER diagram.
- Create an logical data model for relational database of the above designed ER model.
Note:1) An logical data model is collection of relational schemas; 2) A relational schema is : tablename(attributename1, attributename2,…, attributenameN) .
- Create a database “Company”; Create each table of the above logical data model into the Company database.
- Insert at least 3 records into each table of above Company database.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 8 images