Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Table Naming Conventions

RE: Table Naming Conventions

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Tue, 30 Jul 2002 18:03:22 -0800
Message-ID: <F001.004A6D6C.20020730180322@fatcity.com>


I don't like such prefixes because they make it easier to lie or make mistakes. I've seen people try for hours to figure out why something doesn't make sense, only to find out that the index whose name has a 'U' in it actually wasn't created with the "UNIQUE" attribute.

Names falsely cause reliance that cannot be trusted. Making reports on such things easier to run is, to my mind, a better idea than integrating too much information into naming standards.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com

Upcoming events:
- NCOAUG Training Day, Aug 16 Chicago

-----Original Message-----
Sent: Tuesday, July 30, 2002 8:09 PM
To: Multiple recipients of list ORACLE-L

Hmmm. Seems I have to play devil's advocate on this one. So, you see no purpose to index names such as:

P_EMPLOYEE for a Primary key on the employee table or UM_METER_CODE for a unique index on the meter table meter_code column or FE_DEPT for a foreign key index on the employee table dept column or IIE_LOG_DATE for a non-unique index on the import_export table log_date column?

The first letter doesn't help me figure out that the object is an index, but it sure helps to show what the index is being used for.

Constraint naming is another area where we use a one character prefix to identify the constraint type, in part to conform to index naming.

The keeper of standards here (not me) has also imposed prefix conventions on global temporary tables and on selected classes of tables such as work tables or external cross reference tables. It does help keep the developers in line.

Kevin Kennedy
First Point Energy Corporation

If you take RAC out of Oracle you get OLE! What can this mean?

-----Original Message-----
Sent: Tuesday, July 30, 2002 4:58 PM
To: Multiple recipients of list ORACLE-L

You already know it's an index, why would you include that as part of the
name?

Jared

Paula_Stankus_at_doh.state.fl.us
Sent by: root_at_fatcity.com
07/30/2002 02:29 PM
Please respond to ORACLE-L  

        To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>

        cc: 
        Subject:        RE: Table Naming Conventions


My supervisor/client wants object types in names - except tables like I_

for indexes. Why do you say stay away from this? -----Original Message-----
Sent: Tuesday, July 30, 2002 5:10 PM
To: Multiple recipients of list ORACLE-L

Here's a start. Not a checklist by any means, just kind of a micro pet peeves list.
* Decide today whether table names will be singular or plural. Do you want a THING (singular) table? Or a THINGS (plural) table? * Don't use case-sensitive names. E.g., use THING (without quotes) in your CREATE (DDL) statement, which can be spelled "THING", "thing", "Thing", or even "tHiNG" in your developers' SQL. But don't make developers type stuff like this...

    select "Name" from "Thing" where "Id" = y /* won't work without "" */
* Don't embed the object type in the object's name. I used to see this all the time with tablespaces called XYZ_TS, indexes called IND_THING, and so on.
* Decide today whether you want to abbreviate or not. If you do, then construct a formal, standard, consistent list of accepted abbreviations.

Don't name one table CUSTOMER_THING and another CUST_HISTORY.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Upcoming events:
- NCOAUG Training Day, Aug 16 Chicago

-----Original Message-----
Chambers
Sent: Tuesday, July 30, 2002 3:37 PM
To: Multiple recipients of list ORACLE-L All...
Will some of you please provide some insight on your table naming conventions? I'm in the very early planning stages of what will likely be a large and complex schema (IT asset inventory). I have a chance to start it correctly. TIA
Gary Chambers

//------------------------------------- 
// Lucent Technologies GIO/Unix 
// 4 Robbins Road, Westford, MA 01886 
// 978-399-0481 / 888-480-6924 (Pager) 

// Nothing fancy and nothing Microsoft
//------------------------------------- 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
-- 
Author: Gary Chambers 
  INET: gc22_at_lucent.com 
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051 
San Diego, California        -- Public Internet access / Mailing Lists 
-------------------------------------------------------------------- 
To REMOVE yourself from this mailing list, send an E-Mail message 
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in 
the message BODY, include a line containing: UNSUB ORACLE-L 
(or the name of mailing list you want to be removed from).  You may 
also send the HELP command for other information (like subscribing). 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
-- 
Author: Cary Millsap 
  INET: cary.millsap_at_hotsos.com 
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051 
San Diego, California        -- Public Internet access / Mailing Lists 
-------------------------------------------------------------------- 
To REMOVE yourself from this mailing list, send an E-Mail message 
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in 
the message BODY, include a line containing: UNSUB ORACLE-L 
(or the name of mailing list you want to be removed from).  You may 
also send the HELP command for other information (like subscribing). 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: kkennedy
  INET: kkennedy_at_firstpoint.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Cary Millsap
  INET: cary.millsap_at_hotsos.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jul 30 2002 - 21:03:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US