
September 6th, 2004, 12:30 PM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 22
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Triggers - Help!!
Hi,
I am using Oracle 9i database, using the Scott database and need to implement some triggers which take into certain constraints, which are:
Q) No deletions can leave an order without any associated items.
Q) Any new department based in ‘HOUSTON’ is to have the string ‘OIL’ somewhere in the department’s name.
Q) The itemtot attribute (the inclusion of which in the database is evidence of very bad design) needs to be automatically maintained and not be directly updateable.
Q) No individual user is allowed to update the products associated with a particular order more than twice.
Q) Any update or insert into the SALGRADE table has to ensure that salary ranges for each grade do not overlap.
Could someone please show me how to produce triggers for these as I am having great difficulty and am having to use this forum as a last resort.
Any help would be greatly appreciated.
Many thanks
|