0
create table Coordinator(
cor_id char(6) primary key,
cor_name varchar(10) not null,
contact_no char(12),
address varchar(50));

create table Student(
student_id char(6) primary key,
name varchar(10) not null,
department char(20),
grade char(6),
percentage smallint,
contact_no char(12),
address varchar(50));

create table Criteria(
crt_id char(6) primary key,
min_cutoff smallint);

create table Company(
cmp_id char(6) primary key,
crt_id char(6),
cmp_name varchar(25) not null,
grade char(6),
package int,
contact_no char(12),
address varchar(50),
foreign key (crt_id) references Criteria(crt_id));

**create table Coordinate_with(
cor_id char(6),
cmp_id char(6),
date char(10),
shift varchar(10),
primary key (cor_id,cmp_id),
foreign key (cor_id) references Coordinator(cor_id),
foreign key (cmp_id) references Company(cmp_id));**

create table Placed_in(
cmp_id char(6),
student_id char(6),
primary key (cmp_id,student_id),
foreign key (comp_id) references Company,
foreign key (student_id) references Student);

create table Criteria_Branch(
crt_id char(6),
branch_allowed varchar(20),
primary key (crt_id, branch_allowed),
foreign key (crt_id) references Criteria(crt_id);
4

1 に答える 1