Hi guys I need to create a trigger in ORACLE 10g which ensures that a deathDate that is BEFORE the birthDate cannot be entered. I am really struggling on this please can you provide support thank you kind people.
My scheme is:
Actor (actorID, lastName, firstName, middleName, suffix, gender, birthDate, deathDate)
Movie (movieID, title, year, company, totalNoms, awardsWon, DVDPrice, discountPrice)
Quote (quoteID, quote)
Role (roleID ,roleName ,gender ,actorID* ,movieID*)
RoleQuote (roleID*, quoteID*)
Thank you
If there is any more information that you require please ask
My relationship constraint are:
CONSTRAINT_NAME C
------------------------------ -
QUOTE_FK R
ROLE_FK R
MOVIE_ROLE_FK R
ACTOR_ROLE_FK R
ACTORID P
MOVIEID P
QUOTEID P
ROLEID P
ROLEQUOTEID P
Relationships:
ALTER TABLE Role ADD CONSTRAINT ACTOR_ROLE_FK FOREIGN KEY (actorID) REFERENCES Actor (actorID);
ALTER TABLE Role ADD CONSTRAINT MOVIE_ROLE_FK FOREIGN KEY (movieID) REFERENCES Movie (movieID);
ALTER TABLE RoleQuote ADD CONSTRAINT Role_FK FOREIGN KEY (roleID) REFERENCES Role (roleID);
ALTER TABLE RoleQuote ADD CONSTRAINT Quote_FK FOREIGN KEY (quoteID) REFERENCES Quote (quoteID);
That sort of constraint should be implemented as a
CHECKconstraintIf you really need the constraint to be enforced with a trigger (this will be slower and require more work)