-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoInsertion.sql
More file actions
45 lines (38 loc) · 1.95 KB
/
InfoInsertion.sql
File metadata and controls
45 lines (38 loc) · 1.95 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
use UniversityReservationSystem;
INSERT INTO Priorities (Level, Value) VALUES
('Maximum', 5),
('Above Normal', 4),
('Normal', 3),
('Below Normal', 2),
('Minimum', 1);
INSERT INTO States (Name) VALUES
('Active'),
('Waiting'),
('Satisfied'),
('Cancelled'),
('Forgotten'),
('Closed');
INSERT INTO Users (User_ID, Email, Phone, CurrentPriority, BasePriority) VALUES
('PR_JohnDoe', 'johndoe@ub.edu', '123456789', 2, 4), -- Professor
('RS_JaneDoe', 'janedoe@ub.edu', '987654321', 3, 3), -- Researcher
('BS_Stud1', 'student1@ub.edu', '123123123', 3, 3), -- Bachelor Student
('MS_Stud2', 'student2@ub.edu', '321321321', 2, 3), -- Master Student
('SF_Staff', 'staff@ub.edu', '456456456', 1, 2); -- Staff
INSERT INTO Resources (Name, Description) VALUES
('Laptop A', 'Dell Latitude 5500'),
('Laptop B', 'HP Pavilion 15'),
('Projector 1', 'Epson HD Projector'),
('Camera 1', 'Canon EOS R'),
('Whiteboard 1', 'Mobile Whiteboard');
INSERT INTO Reservations (Created_At, Started_At, isEssential, ReservPeriod, Status, Res_ID, Email) VALUES
('2024-26-12 10:00:00', '2024-27-12 14:00:00', 1, 2, 1, 1, 'johndoe@ub.edu'), -- Active, Laptop A
('2024-25-12 15:00:00', '2024-27-12 16:00:00', 0, 3, 2, 2, 'janedoe@ub.edu'), -- Waiting, Laptop B
('2024-24-12 09:00:00', '2024-27-12 10:00:00', 1, 1, 3, 3, 'student1@ub.edu'), -- Satisfied, Projector 1
('2024-20-12 08:00:00', '2024-26-12 12:00:00', 0, 2, 4, 4, 'student2@ub.edu'), -- Cancelled, Camera 1
('2024-19-12 14:00:00', '2024-27-12 15:00:00', 1, 3, 5, 5, 'staff@ub.edu'); -- Forgotten, Whiteboard 1
INSERT INTO Requisitions (Req_ID, Generated_At, Reserv_ID, Status) VALUES
('20240001', '2024-27-12 14:15:00', 1, 1), -- Active, Laptop A
('20240002', '2024-27-12 16:20:00', 3, 6); -- Closed, Projector 1
INSERT INTO Penalties (Reason, Timestamp, Email) VALUES
('Late return of equipment', '2024-27-12 17:00:00', 'student1@ub.edu'),
('Uncollected reserved resource', '2024-26-12 16:00:00', 'student2@ub.edu');