Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    6

    Unanswered: Column Name - any convention?

    Hi guys,
    I am really a non-DB guy. Well, in Java and other languages, there are naming conventions for variables and functions. Like in Java, you follow this convention for naming a variable.

    String firstName and NOT String FirstName

    So, my question is simple after this example, that is there any "Naming Convention" in Oracle 9i for Table Names and Column Names?

    Looking for reply.

    Bye,
    Viki.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    No, everyone gets to set & ignore the "standards" of their own choosing.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2004
    Posts
    6
    Hi,
    What you follows? And is it good to have full qualified names [meaningful] like BusinessTelephone ?

    Bye,
    Viki.

  4. #4
    Join Date
    Jun 2004
    Posts
    4
    Hi

    it is good to follow Standard Conventions when you write this any name that will not be metedata in your software. by the way i think there are Standard Conventions in oracle DB & tool

    Rgds
    Khalid

  5. #5
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    You need to remember those that will follow on behind you, so give the tables & columns meaningful names (e.g. Don't call them Table01, column004 etc).

    If you're creating lots of tables then why not create a naming convention of your own? - in years to come you may be famous!
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  6. #6
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by Vikrama
    I am really a non-DB guy. Well, in Java and other languages, there are naming conventions for variables and functions. Like in Java, you follow this convention for naming a variable.

    String firstName and NOT String FirstName

    So, my question is simple after this example, that is there any "Naming Convention" in Oracle 9i for Table Names and Column Names?
    One point to note is that Oracle prefers to be case-insensitive about column names. Therefore it does not differentiate between firstName and FirstName, and in fact that column would appear as FIRSTNAME in the data dictionary. For that reason, it is very common practice (almost a universal "standard") to use underscores to separate the words in table and column names: FIRST_NAME.

    (Actually it is possible to make Oracle column names case-sensitive, by enclosing them in double quotes: "FirstName". But then the column can only be referenced in double quotes, which is a huge pain. So please, don't ever define table or column names that way!)

    Another programming practice to avoid bringing to table and column names is Hungarian notation. A table of employees should be called EMPLOYEES not tblEmployees (which would look like TBLEMPLOYEES in the data dictionary); a column for the employee's first name should be called FIRST_NAME not strFirstName. We know from context that EMPLOYEES is a table! We can see using "DESC employees" that FIRST_NAME is VARCHAR2(30) (e.g.) - we don't want or need a "str" prefix!

    Yet another source of frustration is when the "same" column has radically different names in different tables, leadng to SQL like:

    ... WHERE e.employee_id = j.person_number

    Be consistent!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •