OpenACS docs are written by the named authors, and may be edited
by OpenACS documentation staff.
-
The Big Picture
+
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
@@ -11,14 +10,14 @@
Why do we need a naming convention?
Oracle limits names,
in general, to 30 characters, which is hardly enough for a human readable constraint name.
-
Abbreviations
+
Abbreviations
We propose the following naming convention for all constraints, with
the following abbreviations taken from Oracle Docs at
http://oradoc.photo.net/ora81/DOC/server.815/a67779/ch4e.htm#8953.
Note that we shortened all of the constraint abbrevations to
two characters to save room.
-
Naming primary keys might not have any obvious advantages. However, here's an
example where naming the primary key really helps (and this is by no means
a rare case!
@@ -71,15 +70,15 @@
3 1 INDEX (UNIQUE SCAN) OF 'EXAMPLE_TOPICS_TOPIC_ID_PK' (UNI
QUE)
-Isn't it nice to see "EXAMPLE_TOPICS_TOPIC_ID_PK" in the trace
+Isn't it nice to see "EXAMPLE_TOPICS_TOPIC_ID_PK" in the trace
and know exactly which table oracle is using at each step?
-
Naming not null constraints is optional...
+
Naming not null constraints is optional...
ArsDigita is split on whether or not we should be naming not null constraints... So, if you want to name them, please do so and follow the above naming standard. But, naming not null constraints is not a requirement at ArsDigita.
About Naming the not null constraints
-Though naming "not null" constraints doesn't help immeditately in error
+Though naming "not null" constraints doesn't help immeditately in error
debugging (e.g. the error will say something like
-"Cannot insert null value into column"), we recommend naming not null
+"Cannot insert null value into column"), we recommend naming not null
constraints to be consistent in our naming of all constraints.