SQL Server 2005 Datatypes Help

  • Hi Team,

    As Many of us know that Datatypes Play key role in the performance .. So I got a Task where I have to give a report on different datatypes of Sql server 2005 and with the advantages and disadvantages of each datatype .. I have also been told that u have to design the database, having performance in mind and with suitable datatype for each of the columns in the tables ..

    Its NOT the School Homework .. Its a Task given by my company .. I m a Software Develper ..

    So Team plz Do help me with this assignment ..

    Thanks and Regards ..

  • School homework? Odd request certainly.

    Pick the most appropriate data type that's as small as possible but not smaller.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Its NOT the School Homework .. Its an Assignment given by my company .. I m a Software Develper ..

  • chaingang.174 (1/20/2011)


    Its NOT the School Homework .. Its an Assignment given by my company .. I m a Software Develper ..

    seems like a waste of time for a professional developer to have to compile a list of data types, but the best place to start would be

    http://msdn.microsoft.com/en-us/library/ms187752.aspx

    as for the advtanges / disadvantages of each it depends on what you are going to use them to store, as stated pick the most appropriate one for your needs.

  • ^ Guys .. First of all .. As a Developer I m familiar with all the datatypes available in sqlserver and have also used it in my projects But the thing is, My Project Manager told me that I should Maintain a document regarding the datatypes which should be used as performance and durability in mind ..

    So i thought i should u guys bcoz i know u guys are experts overhere and I don't have to waste more time on GOOGLE to find that ..

    I hope Everyone understands what m trying to say .. 🙂

  • chaingang.174 (1/20/2011)


    ^ Guys .. First of all .. As a Developer I m familiar with all the datatypes available in sqlserver and have also used it in my projects But the thing is, My Project Manager told me that I should Maintain a document regarding the datatypes which should be used as performance and durability in mind ..

    So i thought i should u guys bcoz i know u guys are experts overhere and I don't have to waste more time on GOOGLE to find that ..

    I hope Everyone understands what m trying to say .. 🙂

    It depends on what you are trying to store in the columns though, it is very difficult to say that datatype A is better than datatype B without knowing what is to be stored in there.

  • My PM Wants Total List of the datatypes with their advantages and disadvantages and their effects on the performance etc ..:-)

  • The problem is there aren't any hard & fast rules for data types & performance. Smaller is better, but if you have a number that won't fit in a tinyint data field, you need to go to smallint, int or bigint. You don't have a choice. varchar stores less data than nvarchar, but if you have to support multiple character sets, you're going to use nvarchar. So this task is a little bit difficult to deliver on. I'd go back & try to get some better definitions on what's needed.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • chaingang.174 (1/20/2011)


    My Project Manager told me that I should Maintain a document regarding the datatypes which should be used as performance and durability in mind ..

    Data types don't have any effect on durability. That's something guaranteed by SQL Server.

    Me thinks your PM doesn't quite know what he wants.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I dint meant Durability that way bro .. My PM knows that lol .. Anyways Thanks @all for ur help .. 🙂

Viewing 10 posts - 1 through 10 (of 10 total)

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