CREATE OR REPLACE TRIGGER FKSimulation BEFORE INSERT ON student FOR EACH ROW
DECLARE numProf integer;
BEGIN
  SELECT COUNT (pname) INTO numProf FROM Professor WHERE pname=:new.advisor;
  IF (numProf <= 0)
    THEN RAISE_APPLICATION_ERROR (-20004, 'Violation of Minimum Salary constraint');
  END IF;
END;
.
