Create sql functions for pc_professor table and pc_schedule table