SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict bimalpoudel's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu, Nepal
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Are short column names useful?

    If you revise a lot of databases, you feel different.
    I have seen field names like id, uid, usrid, userid, user_id.

    Obviously I follow the last one, user_id. It is long, multi worded name, and hard to type than any other names. But it is pretty clear than the others.

    Short column names are confusing to me, what to type in what situation.

    I do not believe that shortening the column names will be a worth. Probably, the storage engine does not have to do anything with the length of the names, rather, they are indexed numerically, internally.

    What do you think on the column names?
    Any links discussed on similar topic?
    Am I wrong?
    Bimal Poudel @ Sanjaal Framework over Smarty Template Engine
    ASKING INTERESTING QUESTIONS ON SITEPOINT FOURM

    Hire for coding support - PHP/MySQL

  2. #2
    SitePoint Member
    Join Date
    Jun 2011
    Location
    Surrey, UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I know it's pure personal preference. Like you I tend to use long column names (within reason) although I use camel notation rather than underscores (so: userId)

    I find long column help in your own debugging situations and are even more helpful when multiple people are working on a database.


Tags for this Thread

Bookmarks

Posting Permissions

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