sql - How do databases differ from MATLAB variables? -
i'm used working data (sometimes large amounts of data) matrices or cells in matlab. i'd make switch managing larger datasets through tools sqlite.
so here question. how approach conceptual switch matlab variables (again multi-dimensional numerical matrices, cells text entries) database? example, if have 4d matrix in matlab, there way store data directly table? or have like, say, make multiple labelled 2d tables? data in database stored in table?
is right think migration of data matlab database like, more or less, reorganization of multidimensional matlab variables set of 2d tables?
any experience migrating data matlab environment sql-accessible database helpful.
a table not 2d array. 4d 2*2*2*2 array stored {{{{1,2},{3,4}},{{5,6},{7,8}}},{{{9,10},{11,12}},{{13,14},{15,16}}}} (it's mentioned in manual). means in database can store 4 coordinates(x,y,z,t) , value.
x|y|z|t|value -+-+-+-+----- 1|1|1|1|1 1|1|1|2|2 1|1|2|1|3 .........
now instead of doing a(1,2,3,4) select value x = 1 , y = 2 , z = 3 , t = 4
though depending on data may 3 coordinates , 2 values each row
x|y|z|value1|value2 -+-+-+------+------ 1|1|1|1 |2 1|1|2|3 |4 .........
or if need selecting whole array @ once may store json or csv value in 1 row.
if have multiple array want array_id column well. array_id may fk table holding name , description of array. should lookup topic of array data structure , database basics (you should relational algebra databases based on there differences).
either way it's not matlab vs. databases question unless have specific question element of matlab different other languages.
Comments
Post a Comment