to denote a table of employees. [B] usp_InsertEmployee --> to denote a user stored procedure that inserts an employee record. Here are some links to other conventions that people use: http://vyaskn.tripod.com/object_naming.htm http://www.ssw.com.au/ssw/standards/DeveloperSQLServer/SQLServerStandard_1_ObjectNaming.aspx -- HTH, SriSamp Please reply to the whole group only! http://www32.brinkster.com/srisamp "Phil" wrote in message news:0c2601c367c9$92eda0c0$gbl...[ref] > Is there a standard or recognised / adopted document for > naming conventions for SQL Server Objects[/ref] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <#7uN#t8ZDHA.1492@TK2MSFTNGP12.phx.gbl> [ref] => <0c2601c367c9$92eda0c0$a101280a@phx.gbl> [htmlstate] => on_nl2br [postusername] => SriSamp [ip] => ssampath@sct.co [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Naming - Microsoft SQL / MS SQL Server

Naming - Microsoft SQL / MS SQL Server

Is there a standard or recognised / adopted doent for naming conventions for SQL Server Objects...

  1. #1

    Default Naming

    Is there a standard or recognised / adopted doent for
    naming conventions for SQL Server Objects
    Phil Guest

  2. #2

    Default Re: Naming

    There is no accepted standard as such and people tend to have their own
    conventions here. A safe method is to have a convention that will help you
    identify objects and their intended purpose, just by looking at their names.
    For example:
    [A] Employees --> to denote a table of employees.
    [B] usp_InsertEmployee --> to denote a user stored procedure that inserts an
    employee record.

    Here are some links to other conventions that people use:
    http://vyaskn.tripod.com/object_naming.htm
    http://www.ssw.com.au/ssw/standards/DeveloperSQLServer/SQLServerStandard_1_ObjectNaming.aspx
    --
    HTH,
    SriSamp
    Please reply to the whole group only!
    http://www32.brinkster.com/srisamp

    "Phil" <com> wrote in message
    news:0c2601c367c9$92eda0c0$gbl... 


    SriSamp Guest

  3. #3

    Default Re: Naming

    As SriSamp said, no real naming rules as such, but for what it's worth we
    use :

    tbXYZ for normal tables. tbTempXYZ for temporary tables (only in sprocs!).
    vwXYZ for views, uspXYZ for sprocs, tskXYZ for tasks and roleXYZ for user
    roles.

    For declared indexes we use idxXYZ.

    For constraints we have cnpXYZ for primary keys (most people use PK_XYZ, but
    we like to note that it's a constraint as well as an indexing option),
    cnuXYZ for unique constraint, cnrXYZ for relational constrains and cncXYZ
    for check constraints.

    We don't currently use much else. All you need to do is be a bit logical.
    It's usually a good idea to get some consensus....we had a right old hoohar
    about column naming and prefixes...we finally compromised on five character
    prefixes (they used the full table name before I got here for christs sake
    i.e MyLongTableNameID instead of MLT_ID).

    Cheers...P





    "Phil" <com> wrote in message
    news:0c2601c367c9$92eda0c0$gbl... 


    Paul Guest

  4. #4

    Default Naming

    Here's another option for a proposed naming convention.

    http://www.wingenious.com/dbaction/DBFree.zip
     

    Brian Guest

  5. #5

    Default Thanks to All: RE:Naming

    Thanks to everyone for all your help and ideas

    We were working along similar lines
    i.e. prefixes for table names tbl_ sprocs etc usp_

    with a description followed by CRUD indicator
    usp_Product_U etc

    Cheers Paul - I like the identifying of a constraint in
    the column name.

    Were also going to go for Pascal Case for naming...
     

     
    phil Guest

Similar Threads

  1. Naming my webpage
    By Placitas in forum Macromedia Contribute Connection Administrtion
    Replies: 4
    Last Post: April 18th, 05:40 PM
  2. Naming container
    By Jonas Auken in forum ASP.NET Building Controls
    Replies: 4
    Last Post: July 30th, 08:17 AM
  3. Var naming S.O.S
    By scourtaud in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: February 22nd, 08:00 AM
  4. Naming Pages
    By MBlom in forum Web Design
    Replies: 3
    Last Post: January 11th, 03:16 AM
  5. batch re-naming
    By Stephen Allen in forum Macromedia Fireworks
    Replies: 10
    Last Post: August 10th, 11:37 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139