Kevin, P_EMPLOYEE doesn't tell you that it's an index, it tells you that this index is used to support a primary key. big difference. :)
I like to use something similar when naming indexes and constraints, but prefer suffixes to prefixes. EMPLOYEE_P is easier to 'group by' in a report. Jared "kkennedy" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/30/2002 06:08 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject: RE: Table Naming Conventions 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 [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/30/2002 02:29 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> 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 - Miracle Database Forum, Sep 20-22 Middlefart Denmark - 2003 Hotsos Symposium on OracleR System Performance, Feb 9-12 Dallas -----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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).