Index: openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 10 Aug 2002 20:07:20 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 @@ -1,8 +1,8 @@ -Constraint naming standard

Constraint naming standard

By mbryzek@arsdigita.com


- OpenACS docs are written by the named authors, but may be edited - by OpenACS documentation staff. -

The Big Picture

+Constraint naming standard

Constraint naming standard

By mbryzek@arsdigita.com


+ OpenACS docs are written by the named authors, but may be edited + by OpenACS documentation staff. +

The Big Picture

Constraint naming standard is important for one reason: The SYS_* name oracle assigns to unnamed constraints is not very understandable. By correctly naming all contraints, we can quickly associate a particular constraint @@ -28,7 +28,7 @@

  • Truncate the column name until it fits.

  • If the constraint name is still too long, you should consider rewriting your entire data model :) -

    Notes:

    • If you have to abbreviate the table name for one of the constraints, abbreviate it for all the constraints

    • If you are defining a multi column constraint, try to truncate the two column names evenly

    Example

    +

    Notes:

    • If you have to abbreviate the table name for one of the constraints, abbreviate it for all the constraints

    • If you are defining a multi column constraint, try to truncate the two column names evenly

    Example

     create table example_topics (
            topic_id    integer
     		   constraint example_topics_topic_id_pk
    @@ -82,6 +82,4 @@
     debugging (e.g. the error will say something like 
     "Cannot insert null value into column"), we recommend naming not null
     constraints to be consistent in our naming of all constraints.
    -

    ($Id$)
    +

    ($Id$)
    View comments on this page at openacs.org