locked
Specifying table types RRS feed

  • Question

  • Is it possible to categorize a table by "type"; for example "Master file" or "Transaction file"?

    If yes, then:

    1. where is this specification made on the table, and
    2. how can I interrogate the table to determine the "type"

    Thanks for feedback.

    Friday, July 17, 2015 3:20 PM

Answers

All replies

  • You could use extended properties for this. Here is a blog with some examples: http://blogs.lessthandot.com/index.php/datamgmt/datadesign/document-your-sql-server-databases/.

    Friday, July 17, 2015 3:55 PM
  • Is it possible to categorize a table by "type"; for example "Master file" or "Transaction file"?

    If yes, then:

    1. where is this specification made on the table, and
    2. how can I interrogate the table to determine the "type"

    Thanks for feedback.

      following proper and consistenct naming conventions will help you out on this.. 

    if the table is master - having something "mstr" or  "dict" in it's name will help - 

    if it is transaction table - having something "txn" in the name will help

    the point is not so much on what the keyword is but being consistent and something that dev can easily tell by the name...


    Hope it Helps!!


    • Edited by Stan210 Friday, July 17, 2015 4:07 PM
    Friday, July 17, 2015 4:07 PM
  • You can use different schemas to consolidate tables of the same 'type / purpose' into a schema. You can take a look at the AdventureWorks sample database organization.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Friday, July 17, 2015 4:28 PM
    Answerer
  • Thank you; this was most helpful.
    Wednesday, July 22, 2015 4:35 AM
  • Thank you.
    Wednesday, July 22, 2015 4:36 AM
  • Thank you. Although I found many "AdventureWorks sample database" entries, I couldn't find one for "organization" (or I missed it!). Do you have a link to it perhaps? Thanks again.

     

    Wednesday, July 22, 2015 5:01 AM
  • What exactly do you mean? As far as I know, the AdventureWorks sample database is the same (or almost the same) in all versions of SQL Server.

    If you don't have it installed and want to install to learn, you may want to check links from this thread

    cannot attatch the adventure works script 2014

    I just suggested this database as a sample of using schemas.

     

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Wednesday, July 22, 2015 5:06 AM
    Answerer