title: What type to use in code and database for huge file size?
body: <p>My project (<code>C#</code>) deals with many files about <code>1 MB ~ 2 GB</code> in size. <code>SQL server 2008</code> database is used. In long-term I need to do some operations over them like total sum of their size and ...</p>
  
  <p>At first glance I was planned to store their size in byte (in C# code <code>long</code>, in database <code>BigInt</code>) because of file size nature and its precise. I was thinking maybe its a better idea to use a double and consider file size in MB because most of them are <code>1~2000 MB</code> and make more sense while talking about files of this project. Is there any advantage/disadvantage over these two kind of designs both in code (performance issues when there are many mathematics operations) and database (batch operations over many files) ?</p>