I need help in building simple database structure. Kind of stuck.
Here’s what I’m trying.
Class means Department+Semester. Eg, Electronics Engineering SemI, Electrical Engg Sem II.. etc..
Student is in class;
Class has a defined group of subjects;
Group consists of multiple subjects.
Class and Subjects, 2 entities depend on same SubjectGroup entity. So isn’t this a ternary relationship ?
I’ve made this image to make picture clear.
[ P = Primary key; F = Foreign Key; Arrows do not mean anything of One-to-many/many to many etc.. they are just showing what referenced where]

I am stuck because I can not refer to GroupId two times.
How should I modify this structure ?
–
Thanks
Entities
Relationships
Tables
Student
Columns:
Subject
Columns:
Class
Queries
Students in a class
Subjects Student is Studying