Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09 - Presentation Transcript

    1. Bangalore MySQL User Group Meet Up October 11, 2009 MySQL Naming Conventions Sudheer Satyanarayana http://techchorus.net http://binaryvibes.co.in
    2. Why?
      • Readability
      • Maintainability
      • Reduced development costs
    3. First Things First
      • Avoid Reserved words
        • Look up the Manual
      • Write a policy
        • One size doesn't fit all
    4. Case Sensitivity
        • All lower case: user_type
        • All upper case: USER_TYPE
        • Camel case: userType
        • Mixed case: UserType
      Be consistent Avoid inconsistent usage like user_type, productType
    5. Databases
      • To prefix or not? mydb or myprefix_mydb
      • You may not have an option
      • You may not want to disclose the database name
    6. Tables
      • To prefix or not? Mytable vs myprefix_mytable
      • Avoid generic prefixes like tbl_user
      • Case sensitivity matters
      • Plural or singular? user vs users
      • Acronyms vs descriptive names
      • Avoid too long or two short names
        • myprefix_user_preferences_type vs
        • user_pref_type
    7. Columns
      • Suffixing _id to indexed key – user_id vs uid vs id
      • Beware of reserved words – timestamp, when
      • Self explanatory foreign key name
        • Table contact: contact_id, PK user_id REFERENCES user_id of user
    8. Benefits
      • More readable
      • Maintainable
      • Avoid deployment problems
      • Reduced development costs
    9. Tip See what established projects are doing
    10. Thank you

    + Sudheer SatyanarayanaSudheer Satyanarayana, 1 month ago

    custom

    250 views, 1 favs, 0 embeds more stats

    Sudheer Satyanarayana presented MySQL Naming Conven more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 250
      • 250 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 3
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories