schema sc_sg {
  model sql_6 {
    table:<<prof>>
    column:<<prof,pname>>
    column:<<prof,area>>
    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,subcode>>
    column:<<dept,hod>>
    primary_key:<<dept_pk,dept,<<dept,dname>>>>

    table:<<degree>>
    column:<<degree,dcode>>
    column:<<degree,dname>>
    primary_key:<<degree_pk,degree,<<degree,dcode>>>>
    foreign_key:<<runs_dept_fk,degree,<<degree,dname>>,dept,<<dept,dname>>>>

    table:<<student>>
    column:<<student,sname>>
    column:<<student,dcode>>
    primary_key:<<student_pk,student,<<student,sname>>>>
    foreign_key:<<reads_degree_fk,student,<<student,dcode>>,dept,<<degree,dcode>>>>
    table:<<worksin>>
    column:<<worksin,pname>>
    column:<<worksin,dname>>
    primary_key:<<worksin_pk,worksin,<<worksin,pname>>,<<worksin,dname>>>>
    foreign_key:<<worksin_prof_fk,worksin,<<worksin,pname>>,prof,<<prof,pname>>>>
    foreign_key:<<worksin_dept_fk,worksin,<<worksin,dname>>,dept,<<dept,dname>>>>

    table:<<teaches>>
    column:<<teaches,pname>>
    column:<<teaches,ccode>>
    column:<<teaches,term>>
    column:<<teaches,evaluation>>
    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,cwmark>>
    column:<<attempt,exmark>>
    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>>>>

    table:<<advises>>
    column:<<advises,pname>>
    column:<<advises,sname>>
    primary_key:<<advises_pk,advises,<<advises,pname>>,<<advises,sname>>>>
    foreign_key:<<advises_prof_fk,advises,<<advises,pname>>,prof,<<prof,pname>>>>
    foreign_key:<<advises_student_fk,advises,<<advises,sname>>,student,<<student,sname>>>>
  }
}
