-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pather-diagram.txt
47 lines (42 loc) · 1.04 KB
/
er-diagram.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
erDiagram
EMPLOYEES {
INT emp_no PK
VARCHAR first_name
VARCHAR last_name
VARCHAR job_title
DECIMAL basic_salary
INT department_id FK
}
DEPARTMENTS {
INT department_id PK
VARCHAR department_name
INT manager_id FK
}
PROJECTS {
INT project_id PK
VARCHAR project_name
DATE start_date
DATE end_date
INT department_id FK
}
EMPLOYEE_PROJECT {
INT emp_no FK
INT project_id FK
DECIMAL hours_worked
}
SALARIES {
INT emp_no FK
DATE salary_date PK
DECIMAL basic_salary
DECIMAL da
DECIMAL hra
DECIMAL gross_salary
DECIMAL tax
DECIMAL net_salary
}
EMPLOYEES ||--o{ DEPARTMENTS: "department_id"
DEPARTMENTS ||--o{ PROJECTS: "department_id"
EMPLOYEES ||--o{ SALARIES: "emp_no"
EMPLOYEES ||--o{ EMPLOYEE_PROJECT: "emp_no"
PROJECTS ||--o{ EMPLOYEE_PROJECT: "project_id"
EMPLOYEES ||--o{ DEPARTMENTS: "manager_id"