-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed.sql
68 lines (53 loc) · 1.84 KB
/
seed.sql
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* ==================================================================================================================================
Hard coding information; the joins will add departmentId, roleId, and managerId. For now, I need to hard-code the data to test.
================================================================================================================================== */
USE employeeDatabase;
INSERT INTO department
(id, deptName)
VALUES
(1, "Microbiology");
INSERT INTO department
(id, deptName)
VALUES
(2, "Chemistry");
INSERT INTO department
(id, deptName)
VALUES
(3, "Physics");
-- Adding role information. Last value relates to department table. --
INSERT INTO role
(title, salary, departmentId)
VALUES("Microbiologist", 33296.53, 1);
INSERT INTO role
(title, salary, departmentId)
VALUES("Chemist", 34596.02, 2);
INSERT INTO role
(title, salary, departmentId)
VALUES("Physicist", 36521.47, 3);
-- Adding employee info. Last 2 values relate to role table. All managers have to go first or else the lesser employees don't have a manager.--
INSERT INTO employee
(firstName, lastName, roleId)
VALUES("Anthony", "Garza", 1);
INSERT INTO employee
(firstName, lastName, roleId)
VALUES("Brianna", "McCray", 2);
INSERT INTO employee
(firstName, lastName, roleId)
VALUES("Kimi", "Inglet", 3);
/*================================================================*/
INSERT INTO employee
(firstName, lastName, roleId, managerId)
VALUES("Crystal", "Ly", 1, 1);
INSERT INTO employee
(firstName, lastName, roleId, managerId)
VALUES("Kurt", "LaVacque", 2, 2);
INSERT INTO employee
(firstName, lastName, roleId, managerId)
VALUES("Justin", "Wofford", 3, 3);
/*================================================================*/
SELECT *
FROM department;
SELECT *
FROM role;
SELECT *
FROM employee;