Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Column Questions
> > 1) Is there a naming convention for indexes and triggers? I've seen a
few
> > examples for indexes, people use K_ and PK_. Just wondered what you
thought
> >
>
> there are quite a few naming conventions in common use.
> we typically use a unique 6 character "table identifier" as
> the first part of the table name (e.g. TVX010_SUBSCRIBER
> and the use the table id in the names of constraints, indexes
> and triggers on the table... e.g. TVX010_PK, TVX010_IX1,
> TR_TVX010. the table identifier is not used in the view name
> (e.g. SUBSCRIBER)
Oh I see. An abbreviated version of the table name? Same for sequences as well? ...and the reason you don't use it in the view name is because a view can reference any number of tables and to prefix it with a table identifier wouldn't make sense?
>
> > 2) I want to create a DESCRIPTION column, which is a VARCHAR2(256). The
> > problem is I want to search it at some point, is it considered an "OK"
thing
> > to create a non-unique index from this?
> >
>
> an index on the DESCRIPTION column may speed up some queries.
> if you mean by "searching", runnint a query using a construct such as
> WHERE DESCRIPTION LIKE '%somestring%', then, no, Oracle will
> not use an index on DESCRIPTION.
Yes, I mean to search for a particular word in the description, for example "Microsoft" or "Product". I just wondered if it were acceptable to index such a column. So Oracle wouldn't use an index on this column? ...even although I created one? Received on Sun May 27 2001 - 19:11:44 CDT