Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: naming conventions for constraints
> On Thu, 01 May 2003 08:23:58 -0700, Daniel Morgan
><damorgan_at_exxesolutions.com> wrote:
>>My feeling is about constraint names is that they should have meaning when you >>get a message from an end-user, or from a record in an error log table, that says >>that the constraint has been violated.
Then again
ORA-02291: integrity constraint (RENE.FK_CUSTOMER) violated - parent key not found
can be more easily transmitted and communicated as
ORA-02291: integrity constraint (RENE.FK_1234_5678_9012) violated - parent key not found
and does not need to be mapped in order to be mapped to which table it refers.
> So, in practice, I use either a table or a text file to map error
> numbers to constraint names. Then I write a couple of programs to
> generate constraints and *.h files (or whatever I need) from the
> table.
Rene Nyffenegger
-- Projektleitung und Entwicklung in Oracle/C++/C# Projekten http://www.adp-gmbh.ch/cv.htmlReceived on Mon May 05 2003 - 17:09:42 CDT