Graduate

Update DB schema

1 CREATE DATABASE attendance DEFAULT CHARACTER SET UTF8; 1 CREATE DATABASE attendance DEFAULT CHARACTER SET UTF8;
2 use attendance; 2 use attendance;
3 +
4 +CREATE TABLE student(
5 +student_id VARCHAR(10) NOT NULL,
6 +student_name VARCHAR(50) NOT NULL,
7 +PRIMARY KEY(student_id)
8 +);
9 +
10 +CREATE TABLE student_embedding(
11 +student_id VARCHAR(10) NOT NULL,
12 +embedding_date DATE NOT NULL,
13 +embedding BLOB NOT NULL,
14 +FOREIGN KEY (student_id) REFERENCES student(student_id)
15 +);
16 +
3 CREATE TABLE lecture( 17 CREATE TABLE lecture(
4 lecture_id VARCHAR(20) NOT NULL, 18 lecture_id VARCHAR(20) NOT NULL,
5 lecture_name VARCHAR(50), 19 lecture_name VARCHAR(50),
...@@ -38,17 +52,4 @@ lecture_room VARCHAR(50) NOT NULL, ...@@ -38,17 +52,4 @@ lecture_room VARCHAR(50) NOT NULL,
38 lecture_start_time TIME NOT NULL, 52 lecture_start_time TIME NOT NULL,
39 lecture_end_time TIME NOT NULL, 53 lecture_end_time TIME NOT NULL,
40 FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id) 54 FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id)
41 -);
42 -
43 -CREATE TABLE student(
44 -student_id VARCHAR(10) NOT NULL,
45 -student_name VARCHAR(50) NOT NULL,
46 -PRIMARY KEY(student_id)
47 -);
48 -
49 -CREATE TABLE student_embedding(
50 -student_id VARCHAR(10) NOT NULL,
51 -embedding_date DATE NOT NULL,
52 -embedding BLOB NOT NULL,
53 -FOREIGN KEY (student_id) REFERENCES student(student_id)
54 ); 55 );
...\ No newline at end of file ...\ No newline at end of file
......