title: How to represent a 2-D data matrix in a database
body: <p>I have a data set which consists of an ID and a matrix (n x n) of data related to that ID.</p>
  
  <p>Both the column names (A,B,C,D) and the Row names (1,2,3) are also important and need to be held for each individual ID, as well as the data (a1,b1,c1,d1,...)</p>
  
  <p>for example:</p>
  
  <h2>ID    |  A  |  B  |  C  |  D  |</h2>
  
  <h2>1     |  a1 |  b1 |  c1 |  d1 |</h2>
  
  <h2>2     | ... | ... | ... | ... |</h2>
  
  <h2>3     | ... | ... | ... | ... |</h2>
  
  <p>I am trying to determine the best way of modelling this data set in a database, however, it seems like something that is difficult given the flat nature of RDBMS.</p>
  
  <p>Am I better off holding the ID and an XML blob representing the data matrix, or am i overlooking a simpler solution here.</p>
  
  <p>Thanks.</p>