ER Diagram is known as Entity-Relationship Diagram, it is used to analyze to structure of the Database. It shows relationships between entities and their attributes. An ER Model provides a means of communication.
ER diagram of Company has the following description :
- Company has several departments.
- Each department may have several Location.
- Departments are identified by a name, D_no, Location.
- A Manager control a particular department.
- Each department is associated with number of projects.
- Employees are identified by name, id, address, dob, dat e_of_joining.
- An employee works in only one department but can work on several project.
- We also keep track of number of hours worked by an employee on a single project.
- Each employee has dependent
- Dependent has D_name, Gender and relationship.
ER Diagram of Company :
This Company ER diagram illustrates key information about Company, including entities such as employee, department, project and dependent. It allows to understand the relationships between entities.
Entities and their Attributes are
- Employee Entity : Attributes of Employee Entity are Name, Id, Address, Gender, Dob and Doj.
Id is Primary Key for Employee Entity.
- Department Entity : Attributes of Department Entity are D_no, Name and Location.
D_no is Primary Key for Department Entity.
- Project Entity : Attributes of Project Entity are P_No, Name and Location.
P_No is Primary Key for Project Entity.
- Dependent Entity : Attributes of Dependent Entity are D_no, Gender and relationship.
Relationships are :
Employees works in Departments –
Many employee works in one Department but one employee can not work in many departments.
Manager controls a Department –
employee works under the manager of the Department and the manager records the date of joining of employee in the department.
Department has many Projects –
One department has many projects but one project can not come under many departments.
Employee works on project –
One employee works on several projects and the number of hours worked by the employee on a single project is recorded.
Employee has dependents –
Each Employee has dependents. Each dependent is dependent of only one employee.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between UML and ER diagram
- ER diagram of Bank Management System
- ER diagram of Library Management System
- Difference between Database and Data Structure
- Difference between Selenium Remote Webdriver and Selenium Webdriver
- Difference between 1NF and 3NF in DBMS
- Real World Applications of Cloud Computing
- Clustering in Data Mining
- Difference between Big Data and Cloud Computing
- Difference between Big Data and Data Analytics
- Difference between DBMS and DSMS
- Basic approaches for Data generalization (DWDM)
- Difference between Selenium RC and Selenium Webdriver
- Easiest way to find the closure set of attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.