title: ORA-02291: integrity constraint (OPS$P2417335.VOD_FILM_CLASS_FK) violated - parent key not found
body: <p>I am having an issue with inserting values into my vod_film table. The tables are the following:</p>
  
  <pre><code>CREATE TABLE vod_classification (
  dbClassId       CHAR(3) NOT NULL,
  dbDescription       VARCHAR2(150),
  CONSTRAINT vod_classification_PK PRIMARY KEY (dbClassId)
  );
  
  CREATE TABLE vod_film (
  dbFilmId          NUMBER(4) NOT NULL,
  dbTitle           VARCHAR2(100) NOT NULL,
  dbDirector_firstname  VARCHAR2(50) NOT NULL,
  dbDirector_lastname   VARCHAR2(50) NOT NULL,
  dbGenre               VARCHAR2(20),
  dbUK_release_date     DATE,
  dbFilename            VARCHAR2(50),
  dbRuntime         NUMBER(4),
  dbClass               CHAR(3),
  CONSTRAINT vod_film_PK PRIMARY KEY (dbFilmId),
  CONSTRAINT vod_film_class_FK FOREIGN KEY (dbClass) REFERENCES vod_classification (dbClassId)
  ON DELETE SET NULL
  );
  
  CREATE TABLE vod_actor (
  dbActorId      CHAR(4) NOT NULL,
  dbFirstname    VARCHAR2(50) NOT NULL,
  dbLastname     VARCHAR2(50) NOT NULL,
  dbDateOfBirth  DATE,
  dbNationality  VARCHAR2(30),
  dbBiography    CLOB,
  CONSTRAINT vod_actor_PK PRIMARY KEY (dbActorId)
  );
  
  CREATE TABLE vod_role (
  dbFilmId           NUMBER(4) NOT NULL,
  dbActorId          CHAR(4) NOT NULL,
  dbCharacterName    VARCHAR2(25) NOT NULL,
  dbFirstAppearance  NUMBER(6),
  dbDescription      CLOB,
  CONSTRAINT vod_role_PK PRIMARY KEY (dbFilmId, dbActorId, dbCharacterName),
  CONSTRAINT vod_role_film_FK FOREIGN KEY (dbFilmId) REFERENCES vod_film (dbFilmId)
  ON DELETE CASCADE,
  CONSTRAINT vod_role_actor_FK FOREIGN KEY (dbActorId) REFERENCES vod_actor (dbActorId)
  ON DELETE CASCADE
  );
  </code></pre>
  
  <p>When I run the following:</p>
  
  <pre><code>INSERT INTO vod_film (dbFilmId, dbTitle, dbDirector_firstname, dbDirector_lastname, dbGenre, dbUK_release_date, dbFilename, dbRuntime, dbClass)
  VALUES (1, 'Toy Story 3', 'lee', 'unkrich', 'Comedy', '19-JUL-2010', 'ToyStory3.mpg', 103, 'U');
  </code></pre>
  
  <p>I have this error return:</p>
  
  <blockquote>
    <p>ORA-02291: integrity constraint (OPS$P2417335.VOD_FILM_CLASS_FK) violated - parent key not found</p>
  </blockquote>
  
  <p>I am unsure why this error returns because the foreign key is referenced to an existing field in the vod_classification. At the time of inserting the data the tables have all been added in what I believe to be the correct order.</p>
  
  <p>Any help on why I am receiving this error would be greatly appreciated or if I need to provide any further information please tell me.</p>
  
  <p>Regards,</p>
  
  <p>Steven.</p>