RE: [SQLDownUnder] [SQLStyle] #1: Singular vs Plural Table Naming


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: David Richards
    • Subject: RE: [SQLDownUnder] [SQLStyle] #1: Singular vs Plural Table Naming
    • Date: Mon, 09 Jul 2007 16:00:04 -0700

    The following is from a developers perspective.

     

    My personal preference is plural but the arguments for it have already been said so I won’t repeat them. 

     

    Having said that, is it that important?  It makes sense to be consistent but what difference would it actually make?  For example, I could name my tables AAAA, AAAB, AAAC, etc.  Why wouldn’t I? Because it would be far too difficult to see what’s going on.  But everything would still work.  So the only reason we are concerned about table names is making it easier for someone looking at the DB to understand what’s going on and easier to find a table they’re looking for.  Also to make it easier for developers using the DB to remember what they're doing.

     

    So…  I’m looking for a table that contains users… what’s it called I wonder… If I see “User”, “Users”, “UserTable”, “UserList”, etc then I know what I’m looking at.  Here the only arguments I would have concerning naming is that you make it easy to find/remember.  For example, “MyTableOfUsers” makes sense if you see it (ie you know what’s in the table) but would be difficult to find/remember.

     

    As a developer, while I do stick with plurals, I think if I mixed up plurals and singular (or is that singulars) I wouldn’t notice any problems.  With all the code generation tools, auto complete, and/or use of constants to store table names, it would make little difference to me.  I’m sure DBAs would have tools for auto complete etc so wouldn’t the same apply?

     

    Don’t get me wrong.  I’m not condoning mixing up naming conventions.  Even if what I just said was completely valid, it wouldn’t look very nice J

     

    Regards

     

    David Richards

    InterDev Pty Ltd

    http://www.interdev.com.au

    Ph:  +61 3 9886 8736 (ext. 209)

    Fax: +61 3 9011 6274

    to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net



    (Click here for more information on the sqldownunder mailling list)