yara2005 بتاريخ: 4 ديسمبر 2007 تقديم بلاغ مشاركة بتاريخ: 4 ديسمبر 2007 please help me to do my TRIGGRS homework When a student tries to register for a course, it is possible that the course is already full, in which case the student should be put in the waiting list for that course. When a student unregisters, it might be that some student is in the waiting list, and should then be registered for the course instead. Such things are typically handled via triggers. You should write two triggers that: 1. when a student tries to register for a course that is full, that student is added to the waiting list for the course. 2. when a student unregisters from a course (and was previously registered and not only in the waiting list), the first student (if any) in the waiting list should be registered for the course instead. Hint: write the triggers on the view you created for registrations instead of on the tables themselves.i wrote all database schema,--------------------------------------------Department(dept_name, dept_abriv)Programme(prog_name, prog_abriv)Host(dept_name, prog_name) pept_name --> Department.dept_name prog_name --> Programme.prog_nameBranch(prog_name, bran_name) prog_name --> Programm.prog_nameRecommend(prog_name, course_code) prog_name --> Programme.prog_name course_code --> Course.course_codeMandatory(prog_name, course_code) prog_name --> Programme.prog_name course_code --> Course.course_codeAdvice(prog_name, course_code) prog_name --> Branch.(prog_name) course_code --> Course.course_codeCompulsory(prog_name, course_code) prog_name --> Branch.(prog_name) course_code --> Course.course_codeStudent(stu_id, prog_name, stu_name) prog_name --> Branch.(prog_name) Givenby(dept_name, course_code) dept_name --> Department.dept_name course_code --> Course.course_codeCourse(course_code, course_name, credit)Prerequistes(necessary, required) necessary --> Course.course_code required --> Course.course_codeclassify(classification, course_code) classification --> CourseCatogary.classification course_code --> Course.course_code Restrict_course(course_code, count_id) course_code --> Course.course_codeControl(course_code, stu_id)course_code --> Course.course_codeGraduate(course_code, stu_id, grade) course_code --> Course.course_code stu_id -->Student.stu_idRegister(course_code, stu_id, reg_date, priority_id) course_code --> Course.course_code stu_id -->Student.stu_idFunctional Dependencies:dept_name -->dept_abrivdept_name --> course_codeprog_name --> prog_abrivprog_name --> bran_namecourse_code --> course_name, creditcourse_code --> classificationcourse_code --> prerequisitestudent_id --> stu_name اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.