title: Calculating report data - C# via Collections or SQLite
body: <p>I'm currently working on a reporting tool for data which is stored in a MSSQL database.
  The database is huge and as it is a production database and I'm not the owner of it I can't extend any functionality (add tables/functions and so on).</p>
  
  <p>To get my report numbers I would need to use expensive queries (cursors) and at the same time I don't want to cause unnecessary strain to the db. It's also quite complex stuff like analyzing inventory movements and usages, not just simple Sums and Counts.</p>
  
  <p>So my current approach is to load the data in small chunks using single queries, loading them into Collections and then run a couple of foreach iterations to calculate the reported data.
  Basically I'm rebuilding the database in memory, of which I then calculate.</p>
  
  <p>I currently have quite a lot of code (and objects for the entities in the db) in there and I'm beginning to think that maybe it would be a better solution to create a local simplified copy of the necessary data via for example a separate SQLLite-DB.</p>
  
  <p>I also considered linq to objects but essentially I still need to create and fill the objects...
  And a DB would even give the capability to just create new queries for new reports instead of hard-coding them. 
  On the other hand it might be slower than to do all in Collections...</p>
  
  <p>So, the question (finally):
  What do you think, would it be better to manually replicate a simplified and reduced version of the data to a local db or would you go with other solutions?</p>