Graduate

Commit for merge

CREATE DATABASE attendance DEFAULT CHARACTER SET UTF8;
use attendance;
\ No newline at end of file
INSERT INTO lecture(lecture_id, lecture_name, lecture_room)
VALUES('0', '캡스톤디자인1', '소융대');
INSERT INTO student(student_id, student_name)
VALUES('2014104149', '정해갑');
INSERT INTO student(student_id, student_name)
VALUES('2014104161', '허진호');
INSERT INTO student(student_id, student_name)
VALUES('2014104117', '양원영');
INSERT INTO student(student_id, student_name)
VALUES('2016100789', '이준오');
INSERT INTO lecture_students(lecture_id, student_id)
VALUES('0', '2014104149');
INSERT INTO lecture_students(lecture_id, student_id)
VALUES('0', '2014104161');
INSERT INTO lecture_students(lecture_id, student_id)
VALUES('0', '2014104117');
INSERT INTO lecture_students(lecture_id, student_id)
VALUES('0', '2016100789');
\ No newline at end of file
CREATE TABLE lecture(
lecture_id VARCHAR(20) NOT NULL,
lecture_name VARCHAR(50),
lecture_room VARCHAR(50) NOT NULL,
PRIMARY KEY(lecture_id)
);
CREATE TABLE lecture_students(
lecture_id VARCHAR(20) NOT NULL,
student_id VARCHAR(10) UNIQUE,
FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id),
FOREIGN KEY (student_id) REFERENCES student(student_id)
);
CREATE TABLE student_attendance(
lecture_id VARCHAR(20) NOT NULL,
student_id VARCHAR(10) NOT NULL,
status VARCHAR(10) NOT NULL,
attendance_time DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id),
FOREIGN KEY (student_id) REFERENCES student(student_id)
);
CREATE TABLE undefined_image(
lecture_id VARCHAR(20) NOT NULL,
image MEDIUMBLOB NOT NULL,
width SMALLINT NOT NULL,
height SMALLINT NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id)
);
CREATE TABLE lecture_schedule(
lecture_id VARCHAR(20) NOT NULL,
lecture_day VARCHAR(20) NOT NULL,
lecture_start_time TIME NOT NULL,
lecture_end_time TIME NOT NULL,
FOREIGN KEY (lecture_id) REFERENCES lecture(lecture_id)
);
\ No newline at end of file
CREATE TABLE student(
student_id VARCHAR(10) NOT NULL,
student_name VARCHAR(50) NOT NULL,
PRIMARY KEY(student_id)
);
CREATE TABLE student_embedding(
student_id VARCHAR(10) NOT NULL,
embedding_date DATE NOT NULL,
embedding BLOB NOT NULL,
FOREIGN KEY (student_id) REFERENCES student(student_id)
);
\ No newline at end of file
No preview for this file type
File mode changed