Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> use triggers to enforce interigity

use triggers to enforce interigity

From: Jingyan <jingyan.xu_at_tst2000.com>
Date: Sun, 28 Nov 1999 16:33:32 -0800
Message-ID: <XOj04.1649$LK3.63269@nuq-read.news.verio.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US