Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59

    Unanswered: 2 or 3 digits in column names???

    Hi folks,

    Im writing a data dictionary to my developers, and I am in doubt.
    The current tables in my database were all abbreviated with 3 digits in the past.
    I am intending to abbreviate them with 2 digits from now on.
    For instance: the column DEATH DATE in my tables are death_dat.
    But with the dictionary this will become death_dt.
    In reality we didnt have a Data Administrator so things were created without standard.
    Now I am the person who will define the name standard for the objects in my database.
    What your suggestions: change the abbreviatiosn to 2 digits or let them with 3 as they are now.
    Whats better for my database????

    Thanks
    Nadia

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Personally,
    I believe in making meaningful names. When another developer goes into some code and sees a variable name called "death_dat". what is it. From the name I would assume Death Data. Why not just use DEATH_DATE. It descriptive and meaningful. While I do NOT suggest having all my column names 32 characters long, I think that it is better to have meaningful names then to save 2 bytes in a 10 gig database. Always write an application and define your data model so that a complete stranger (or you in six months) can figure out what is going on.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    within reason, you should name columns what they are.

    customer_identifier can be customer_id or cust_id. But this is obvious.
    If you IT department has naming standards, then that is the way to go.

    If everyone in develoipment names date columns as "blah_dt" then all will know what these mean and you have a key for newcomers to decipher the naming conventions.

    IMO, everything (naming) should be OBVIOUS and LOGICAL as to what it is. Keep in mind you will have Corporate executives possibly looking as a high-level data model with these names in it. If you confuse them, they might not think you know what you are doing.

    My personal pet-peeve is naming columns differently in two tables that hold the same data and have a referential constraint to each other. Relations should have the same name so you can easily find data without memorizing the data model and constraints.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    You didn't understand the point.
    I need to abbreviate some words and this is already decided.
    My doubt is to replace all the current abbreviations in my database which are composed by 3 digits for abbreviations with 2 digits?
    I mean, will I save space with this change or it is useless?
    Nadia

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by nadiapedrosa
    You didn't understand the point.
    I need to abbreviate some words and this is already decided.
    My doubt is to replace all the current abbreviations in my database which are composed by 3 digits for abbreviations with 2 digits?
    I mean, will I save space with this change or it is useless?
    If you change the name of a column from DEATH_DTE to DEATH_DT, you will save ONE character in the entire database. It is really meaningless. The important thing is to make the names meaningful and consistant.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  6. #6
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    Ok, but it is not only one saved byte.
    I'll repeat this for every column for every table in my database.
    Each column with a 3 digit abbreviation will be replaced by a 2 digit abbreviation.
    Is it still useless for space purposes????
    Nadia

  7. #7
    Join Date
    Jul 2003
    Posts
    2,296
    what about the ramifications of changing all the application code to account for the column-name changes? Wouldn't that be a good deal of work or does this not apply in this case?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  8. #8
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    Ok, this is a good question.
    IMO, we have two choices: the previous objects stay with their current names, and only new objects will be abbreviated with 2 digits.
    Or we can do a complete work and change all the current and new objects names, but I don't know if this is a good idea ...
    Nadia

  9. #9
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by nadiapedrosa
    Ok, but it is not only one saved byte.
    I'll repeat this for every column for every table in my database.
    Each column with a 3 digit abbreviation will be replaced by a 2 digit abbreviation.
    Is it still useless for space purposes????
    Say you have 1000 tables where you change 3 letter abbrevs to 2 letter abbrevs. You have saved maybe 1 or 2K out of gigabytes of storage. What a waste of effort to change applications and tables.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  10. #10
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I think it's useless ... just look at Bill's example - changing 1000 tables will make you sick, and you won't even change first hundred of them.

    If you want to save some space, you'd better think of reducing column declarations. For example, if you have a column "death_year NUMBER", it's just like as if you declared it as a "death_year NUMBER(38)" while it would be enough "NUMBER(4)". In a table with millions of rows this might make a difference.
    However, dealing with today's inexpensive large capacity disks, I really, really agree with Bill and Duck - don't waste your time because you won't do much good.

  11. #11
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    Ok, you convinced me!
    It will be really useless...
    Nadia

Posting Permissions

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