Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Integrity constraint violated

Re: Integrity constraint violated

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Tue, 8 Aug 2006 12:08:43 GMT
Message-ID: <J3oHqo.53E@igsrsparc2.er.usgs.gov>


mamin_at_o2.pl wrote:

>> Please read the error message *carefully* and try to understand it.
>> It tells you for the ZAMOWIENIA_POZYCJE record with stawka_vat_id 1,
>> there is no corresponding FAKTURY_VAT record, with ID 1.
>> Unless your constraints are deferred (so they are checked at commit),
>> the FAKTURY_VAT parent record needs to be present and committed prior
>> to inserting any ZAMOWIENIA_POZYCJE record with STAWKA_VAT_ID 1.
>>

>
>
> Thanks,
> I think You are right. But if so , this constraint is incorrect because
> in fact ZAMOWIENIA_POZYCJE table has column FAKTURA_VAT_ID, where
> foreign key from FAKTURY_VAT is being stored.While STAWKA_VAT_ID column
> keeps foreign key from STAWKI_VAT table.
> So, is it possible that Oracle has generated incorrect constraint?
>

Oracle has not generated this constraint for you...this constraint was created when the database schema was designed. The designer of the schema has determined that this business rule must be followed and coded that rule in the form of the constraint. You will have to talk with the database designer to determine why their constraint exists. This may mean talking with your application's vendor.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Tue Aug 08 2006 - 07:08:43 CDT

Original text of this message

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