Table and Column naming convention

  • Hi All,

    I was wondering what naming conventions are used for best practice. Such as camel case etc.

    For tables I've seen the following in the adventure works database a "." in the table name. Its almost like being part of the schema.

    Person.Person

    Person.Details

    Person.Address

    Person.Contact

    I normally use an underscore instead. Is using a "." a new standard for naming tables?

    Also for field names I usually use Id for the key and then try stick to camel case for other fields

    Can anyone share their naming conventions and what they think works well.

    Thanks

    Dave

  • The "." is not part of the table name, it's the schema name.

    You could check the Stairway for Database Design, it can give you an introduction to a naming convention.

    I prefer underscores, but other prefer CamelCase, I'm unaware if there's a general rule but I've found that many things go by personal preference.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (11/15/2012)


    The "." is not part of the table name, it's the schema name.

    You could check the Stairway for Database Design, it can give you an introduction to a naming convention.

    I prefer underscores, but other prefer CamelCase, I'm unaware if there's a general rule but I've found that many things go by personal preference.

    Ah thankyou, is using schemas a good idea? What are the benefits is it mainly for controlling security on objects ?

  • bugg (11/15/2012)


    Luis Cazares (11/15/2012)


    The "." is not part of the table name, it's the schema name.

    You could check the Stairway for Database Design, it can give you an introduction to a naming convention.

    I prefer underscores, but other prefer CamelCase, I'm unaware if there's a general rule but I've found that many things go by personal preference.

    Ah thankyou, is using schemas a good idea? What are the benefits is it mainly for controlling security on objects ?

    Schemas are great for implementing security but you can also use them as simple containers to categorize your objects and not utilize any of the security features if you do not need them:

    Keep Schema and Ownership Simple by Dan Guzman

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply