SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast TheNinthPlayer's Avatar
    Join Date
    Jan 2004
    0 Post(s)
    0 Thread(s)

    db naming scheme?

    What naming scheme do most professional use?

    It seems to me that the underscore is usally saved to be used as part of the prefix 'wp_' (wordpress), 'ipb_' (invision power board). After that I've seen people use diffrent things. Some seperate word like Entity ID with an underscore 'entity_id', other merge them toghter as one word 'entityid', and still other captilize the first letter of the next word 'entityId'.

    I realize its completely up to whom ever to use whatever but I still imagine one scheme is more common then the other.

  2. #2
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    0 Post(s)
    0 Thread(s)

    that naming scheme: appname_tablename is only used by applications intended to run on mysql in a webhosting environment., It is common for the hoster to sell a single database, so it is important to be able to distinguish between one applications's tables and anothers.

    Apart from that there are few standard naming schemes. Oracle and DB2 lovers tend to use ALLCAPS which I've never understood.

    MS SQL and Sybase devs tend to avoid prefixes, especially those starting with sp_ because the database itself uses them.

    MS Access comes with a whole list of suggested naming conventions, which is nice for the inexperienced I suppose.

    When naming tables, I usually use the plural, such as Customers, Products, Stores. Some people say it should be in the singular, but as long as it is consistent that's fine I believe.

    I tend to use Capital Case for tables, camelCase never, and smallcaps for fields, indexes, constraints....



Posting Permissions

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