-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsql.sql
More file actions
45 lines (42 loc) · 1.26 KB
/
sql.sql
File metadata and controls
45 lines (42 loc) · 1.26 KB
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
DROP TABLE IF EXISTS reimbursement_request;
DROP TABLE IF EXISTS Management_user;
DROP TABLE IF EXISTS Employee_user;
DROP TABLE IF EXISTS Reimbursement;
DROP TABLE IF EXISTS Employee;
DROP TABLE IF EXISTS Management;
create table Management (
Id serial primary Key,
Name varchar(50) not Null,
Location varchar(50) not Null,
Phone_Number varchar(50) not Null,
email varchar(150) not Null
);
create table Employee (
Id serial primary Key,
Name varchar(50) not Null,
Location varchar(50) not Null,
Phone_Number varchar(50) not Null,
email varchar(150) not Null
);
create table Employee_user(
Id serial primary Key not Null,
Employee_id int references employee(id),
username varchar(50) not Null,
password varchar(50) not Null
);
create table Management_user(
id Serial primary key not null,
Management_id int references Management(id),
username varchar(50) not Null,
password varchar(50) not Null
);
create table reimbursement_request(
id serial primary key,
employee_id int references employee(id),
manangement_id int references management(id),
manangement_Approval varchar(50) not Null,
title varchar(50) not Null,
description varchar(550),
amount real not Null,
receipt BYTEA not Null
)