Graduate

Commit for merge

1 +CREATE DATABASE attendance DEFAULT CHARACTER SET UTF8;
2 +use attendance;
...\ No newline at end of file ...\ No newline at end of file
1 +INSERT INTO lecture(lecture_id, lecture_name, lecture_room)
2 +VALUES('0', '캡스톤디자인1', '소융대');
3 +
4 +INSERT INTO student(student_id, student_name)
5 +VALUES('2014104149', '정해갑');
6 +INSERT INTO student(student_id, student_name)
7 +VALUES('2014104161', '허진호');
8 +INSERT INTO student(student_id, student_name)
9 +VALUES('2014104117', '양원영');
10 +INSERT INTO student(student_id, student_name)
11 +VALUES('2016100789', '이준오');
12 +
13 +INSERT INTO lecture_students(lecture_id, student_id)
14 +VALUES('0', '2014104149');
15 +INSERT INTO lecture_students(lecture_id, student_id)
16 +VALUES('0', '2014104161');
17 +INSERT INTO lecture_students(lecture_id, student_id)
18 +VALUES('0', '2014104117');
19 +INSERT INTO lecture_students(lecture_id, student_id)
20 +VALUES('0', '2016100789');
...\ No newline at end of file ...\ No newline at end of file
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) UNIQUE,
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 +status VARCHAR(10) NOT NULL,
19 +attendance_time DATETIME DEFAULT CURRENT_TIMESTAMP,
20 +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id),
21 +FOREIGN KEY (student_id) REFERENCES student(student_id)
22 +);
23 +
24 +CREATE TABLE undefined_image(
25 +lecture_id VARCHAR(20) NOT NULL,
26 +image MEDIUMBLOB NOT NULL,
27 +width SMALLINT NOT NULL,
28 +height SMALLINT NOT NULL,
29 +timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
30 +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id)
31 +);
32 +
33 +CREATE TABLE lecture_schedule(
34 +lecture_id VARCHAR(20) NOT NULL,
35 +lecture_day VARCHAR(20) NOT NULL,
36 +lecture_start_time TIME NOT NULL,
37 +lecture_end_time TIME NOT NULL,
38 +FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id)
39 +);
...\ No newline at end of file ...\ No newline at end of file
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
File mode changed