How to represent a 2-D data matrix in a database

后端 未结 6 1700
萌比男神i
萌比男神i 2020-12-07 11:38

I have a data set which consists of an ID and a matrix (n x n) of data related to that ID.

Both the column names (A,B,C,D) and the Row names (1,2,3) are also importa

6条回答
  •  抹茶落季
    2020-12-07 12:02

    can the data be thought of as "row data"? if so then maybe you could store each row as a Object (or XML Blob) with data A,B,C,D and then, in your "representation", you use something like a LinkedHashMap (assuming Java) to get the objects with an ID key.

    Also, it seems that by its very basic nature, a typical database table already does what you need doesn't it?

提交回复
热议问题