Table students{
idx bigint [pk, increment]
studentID int [not null, unique]
name varchar(20) [not null]
department1 varchar(30) [not null]
department2 varchar(30) [not null]
gender bool [not null]
colleage_idx bigint [ref: > colleage.idx]
}
Table subject{
idx bigint [pk, increment]
code varchar(10) [not null, unique]
}
Table grade{
idx bigint [pk, increment]
score varchar(5) [not null]
// students_idx bigint [not null]
// subject_idx bigint [not null]
students_subject_reg_idx bigint [ref:> students_subject_reg.idx]
}
Table colleage{
idx bigint [pk, increment]
coll_name varchar(30) [not null, unique]
}
Table students_subject_reg {
idx bigint [pk, increment]
students_idx bigint [ref:> students.idx]
subject_idx bigint [ref:> subject.idx]
}
※ (잘못된 설계) 별도의 학과 테이블 필요