Я бы создал модель базы данных, такую как:
create table subject (
id int primary key not null,
name varchar(50) not null,
credits int not null
);
create table student (
id int primary key not null,
name varchar(50) not null
);
create table gpa_score (
subject_id int not null,
student_id int not null,
score int not null,
weighted_score int not null, -- added extra column as requested
constraint pk_gpa primary key (subject_id, student_id),
constraint fk1 foreign key (subject_id) references subject (id),
constraint fk2 foreign key (student_id) references student (id)
);