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 -> Re: use triggers to enforce interigity

Re: use triggers to enforce interigity

From: Kevin O'Gorman <kevin_at_trixie.kosman.via.ayuda.com>
Date: Sun, 28 Nov 1999 17:07:51 -0800
Message-ID: <3841D1E7.BE0B3248@trixie.kosman.via.ayuda.com>


Jingyan wrote:
>
> 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

I hope nobody needs reminding not to do someone else's homework. This student
will learn more by thinking it through.

--
Kevin O'Gorman (805) 650-6274 kogorman_at_pacbell.net At school: kogorman_at_cs.ucsb.edu
Permanent e-mail forwarder: Kevin.O'Gorman.64_at_Alum.Dartmouth.org Received on Sun Nov 28 1999 - 19:07:51 CST

Original text of this message

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