Showing
5 changed files
with
52 additions
and
0 deletions
DB/SQL/create_database_attendance.sql
0 → 100644
DB/SQL/create_table_lecture.sql
0 → 100644
1 | +CREATE TABLE lecture( | ||
2 | +lecture_id VARCHAR(20) NOT NULL, | ||
3 | +lecture_name VARCHAR(50), | ||
4 | +lecture_room VARCHAR(50) NOT NULL, | ||
5 | +PRIMARY KEY(lecture_id) | ||
6 | +); | ||
7 | + | ||
8 | +CREATE TABLE lecture_students( | ||
9 | +lecture_id VARCHAR(20) NOT NULL, | ||
10 | +student_id VARCHAR(10) NOT NULL, | ||
11 | +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id), | ||
12 | +FOREIGN KEY (student_id) REFERENCES student(student_id) | ||
13 | +); | ||
14 | + | ||
15 | +CREATE TABLE student_attendance( | ||
16 | +lecture_id VARCHAR(20) NOT NULL, | ||
17 | +student_id VARCHAR(10) NOT NULL, | ||
18 | +attendance_date DATE NOT NULL, | ||
19 | +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id), | ||
20 | +FOREIGN KEY (student_id) REFERENCES student(student_id) | ||
21 | +); | ||
22 | + | ||
23 | +CREATE TABLE undefined_image( | ||
24 | +lecture_id VARCHAR(20) NOT NULL, | ||
25 | +date DATE NOT NULL, | ||
26 | +image BLOB NOT NULL, | ||
27 | +width SMALLINT NOT NULL, | ||
28 | +height SMALLINT NOT NULL, | ||
29 | +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id) | ||
30 | +); | ||
31 | + | ||
32 | +CREATE TABLE lecture_schedule( | ||
33 | +lecture_id VARCHAR(20) NOT NULL, | ||
34 | +lecture_day VARCHAR(20) NOT NULL, | ||
35 | +lecture_start_time TIME NOT NULL, | ||
36 | +lecture_end_time TIME NOT NULL, | ||
37 | +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id) | ||
38 | +); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
DB/SQL/create_table_student.sql
0 → 100644
1 | +CREATE TABLE student( | ||
2 | +student_id VARCHAR(10) NOT NULL, | ||
3 | +student_name VARCHAR(50) NOT NULL, | ||
4 | +PRIMARY KEY(student_id) | ||
5 | +); | ||
6 | + | ||
7 | +CREATE TABLE student_embedding( | ||
8 | +student_id VARCHAR(10) NOT NULL, | ||
9 | +embedding_date DATE NOT NULL, | ||
10 | +embedding BLOB NOT NULL, | ||
11 | +FOREIGN KEY (student_id) REFERENCES student(student_id) | ||
12 | +); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
-
Please register or login to post a comment