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: Jingyan <jingyan.xu_at_tst2000.com>
Date: Mon, 29 Nov 1999 11:23:57 -0800
Message-ID: <smA04.1696$LK3.65291@nuq-read.news.verio.net>


If I can figure everything out, I will be an expert, not a student. Jingyan

Kevin O'Gorman wrote in message
<3841D1E7.BE0B3248_at_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 Mon Nov 29 1999 - 13:23:57 CST

Original text of this message

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