> >What about even shorter notation, something like
> >
> >TurbineU_PK
> >TurbineR_PK
> >TurbineG_PK
> >TurbineP_PK
> >TurbineUGR_FK_U
> >TurbineUGR_FK_G
> >TurbineUGR_FK_R
> >TurbineRP_FK_R
> >TurbineRP_FK_P
> >
> >+ namespace safe
> >+ no ambiguity
> >+ no truncated names
> >
> >Thoughts?
> 
> Index names and other database object names related to tables 
> need only
> be unique in the first 18 chars.  Therefore, they _could_ be assigned
> serial numbers (ie. IDX_00456).  The application _never_ has to refer
> to them by name anyway.

Not always true; you may need to use index names when optimizing
queries. Oracle uses special "comments" to do this, and you
can specify an index by name to force (or not) its use. I'm not
for or against this kind of optimization, I'm just pointing it
out as an example that would call for clear index names.

> However, they should *not* be generated this
> way because error messages typically include the database object name
> (i.e. the index name) and the index names should make it clear to a
> _human_viewer_ what the index was.

Yes, this is another good reason for clear index (and other objects)
names.

I believe Rafal's idea is the correct approach, so +1 on it.
Remember to leave room for numeric suffixes, for cases such as
"check" indexes, or whatever:

  TurbineG_C1
  TurbineG_C2
  ...


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to