schema sc_s2_s4 {
  model sql_6 {
    table:<<prof>>
    column:<<prof,pname>>
    primary_key:<<prof_pk,prof,<<prof,pname>>>>

    table:<<course>>
    column:<<course,ccode>>
    column:<<course,title>>
    primary_key:<<course_pk,course,<<course,ccode>>>>

    table:<<dept>>
    column:<<dept,dname>>
    column:<<dept,hod>>
    primary_key:<<dept_pk,dept,<<dept,dname>>>>

    table:<<class>>
    column:<<class,gid>>
    column:<<class,dname>>
    column:<<class,pname>>
    primary_key:<<class_pk,class,<<class,gid>>>>
    foreign_key:<<in_dept_fk,class,<<class,dname>>,dept,<<dept,dname>>>>
    foreign_key:<<tutor_prof_fk,class,<<class,pname>>,prof,<<prof,pname>>>>

    table:<<student>>
    column:<<student,sname>>
    column:<<student,dcode>>
    column:<<student,gid>>
    primary_key:<<student_pk,student,<<student,sname>>>>

    table:<<teaches>>
    column:<<teaches,pname>>
    column:<<teaches,ccode>>
    column:<<teaches,term>>
    primary_key:<<teaches_pk,teaches,<<teaches,pname>>,<<teaches,ccode>>,<<teaches,term>>>>
    foreign_key:<<teaches_prof_fk,teaches,<<teaches,pname>>,prof,<<prof,pname>>>>
    foreign_key:<<teaches_course_fk,teaches,<<teaches,ccode>>,course,<<course,ccode>>>>

    table:<<attempt>>
    column:<<attempt,sname>>
    column:<<attempt,ccode>>
    column:<<attempt,term>>
    primary_key:<<attempt_pk,attempt,<<attempt,sname>>,<<attempt,ccode>>,<<attempt,term>>>>
    foreign_key:<<attempt_student_fk,attempt,<<attempt,sname>>,student,<<student,sname>>>>
    foreign_key:<<attempt_course_fk,attempt,<<attempt,ccode>>,course,<<course,ccode>>>>


  }
}
