Re: Constraint naming conventions
Date: 1996/04/30
Message-ID: <4m67mv$urs_at_useneta1.news.prodigy.com>#1/1
We use a constraint naming convention as follows:
Primary Keys: Table_Name_PK
We have a convention that every table and view in a schema has a two character unique abbreviation, that we store in the data dictionary by creating a synonym. If there is a table named My_Table that has a foreign key referencing a table named My_Ref_Table, and the two character abbreviation for My_Ref_Table is MR, then the Foreign Key is named: My_Table_MR_FK
Check constraints are named to make the error message for a violated constraint more understandable to users. The general principle is to name or abbreviate the name for the columns checked, and the purpose of the check.
For example: Proj_Begin_Date_LT_End_Date
Gender_M_or_F
We are not totally happy with this, but will use it for now. Received on Tue Apr 30 1996 - 00:00:00 CEST