Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> use triggers to enforce interigity
Hi,
My homework assignment is to use triggers to enforce integrity.
I have student(student_id, student_name), course(course_id,course_title),
and studentCourse(student_id, course_id) tables. each table has a trigger.
in the trigger of student table, when the student_id is updated, the same
student_id in studentCourse is updated too. the trigger in studentCourse
check if new student_id that will be set in the studentCourse has exist in
the student table. if not, the trigger will be raise a error and give up the
updating.
But when I update the student_id of student table, I got error. I guess I
should not use my approach to enforce integrity. How to enforce them?
Thank a lot,
Jingyan Xu Received on Sun Nov 28 1999 - 18:33:32 CST