-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.sql
103 lines (89 loc) · 1.96 KB
/
tables.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
CREATE TABLE blocking
(
academic_year VARCHAR(12),
semester VARCHAR(5),
lab VARCHAR(6),
_day VARCHAR(10),
fromperiod INTEGER,
toperiod INTEGER,
PRIMARY KEY(academic_year, semester, lab, _day, fromperiod, toperiod)
);
CREATE TABLE booking
(
staffId VARCHAR(6),
programme VARCHAR(10),
_year INTEGER,
lab VARCHAR(6),
bookingDate DATE,
entryDate DATE,
fromperiod INTEGER,
toperiod INTEGER,
purpose VARCHAR(1000),
PRIMARY KEY( lab, bookingDate, fromperiod, toperiod )
);
CREATE TABLE complaints
(
complaintId int NOT NULL AUTO_INCREMENT,
userId VARCHAR(6),
lab VARCHAR(6),
_row INTEGER,
_col INTEGER,
systemNo INTEGER,
requirement VARCHAR(1000),
date_time DATETIME,
_status VARCHAR(20),
resolvedDate DATE,
remarks VARCHAR(500),
resolvedBy VARCHAR(40),
PRIMARY KEY(complaintId)
);
CREATE TABLE course_dates
(
academic_year VARCHAR(12),
class VARCHAR(10),
semester VARCHAR(5),
start_date DATE,
end_date DATE,
PRIMARY KEY (academic_year, class, semester)
);
CREATE TABLE login_requests
(
requestId int NOT NULL AUTO_INCREMENT,
staffid VARCHAR(6),
staffname VARCHAR(40),
staffemail VARCHAR(80),
class VARCHAR(5),
daterequested DATETIME,
dateneeded DATE,
fromperiod INTEGER,
toperiod INTEGER,
_type VARCHAR(10),
nooflogins INTEGER,
tools VARCHAR(40),
series VARCHAR(20),
_status VARCHAR(20),
PRIMARY KEY(requestId)
);
CREATE TABLE schedule
(
academicYear VARCHAR(12),
semester VARCHAR(5),
_year INTEGER,
programme VARCHAR(10),
lab VARCHAR(6),
_day VARCHAR(10),
period INTEGER,
PRIMARY KEY(_day, lab, period, academicYear, semester)
);
CREATE TABLE wifi (
rollNo VARCHAR(6),
_name VARCHAR(50),
mac VARCHAR(20),
model VARCHAR(100),
_type VARCHAR(15),
mobile VARCHAR(10),
routerName VARCHAR(20),
verify VARCHAR(20),
_status VARCHAR(10),
PRIMARY KEY(rollNo)
);