title: Building a database to store matrices in SQLite
body: <p><strong>In a database for an engineering simulation forecasting application:</strong></p>
  
  <ul>
  <li>Each user creates a "project".</li>
  <li>In a project, the user specifies the number of items for 2 categories: cat_1 and cat_2.</li>
  <li>cat_1 and cat_2 will have n1 and n2 items respectively.</li>
  <li>The program then converts cat_1 and cat_2 into two matrices mat_1 mat_2 such that for each matrix rows = columns = n1 or n2. I.e. if a category has 3 records ('a', 'b', and 'c'), the matrix will be 3 by 3 with the rows and columns being 'a', 'b' and 'c'.</li>
  <li>The matrix will be then multiplied by a factor (K_r).</li>
  <li>The multiplication returns 48 matrices, 96 matrices, 48 for cat_1 and 48 for cat_2.</li>
  <li>In each matrix there are control array/variables mat_1_aij and mat_2_bi2j2 that the user specifies and provides values for.</li>
  <li>These variables represent field collected data that the simulation should match.</li>
  <li>An algorithm iterates through both matrices a number of times (1,000 or so) until the observed value(s) == mat1_aij and mat_2bi2j2 respectively. </li>
  </ul>
  
  <p><strong>Question</strong></p>
  
  <p>What is the best practice way to design/build/store such a database (especially the matrices) and what are some of the design/implementation issues you might foresee?</p>