将大型阵列存储到一个桌子中,并在SQLite中使用10,000列
我希望能够将一些100x100矩阵存储在数据库(协方差矩阵)中的表格上。对我来说,第一个好一步是将矩阵弄平并将矩阵结构(除其他事项)存储到父表中。
但是,创建这样的表格将需要制作一个大约10,000列的表。编写如此多的字段名称会使我的SQL代码非常大,如果我想查询该矩阵,我将不知道从哪里开始。
是否有一种整洁的方法可以在SQL中指定此类表?我是否可以使用这样的表格从数据库中设置或获取特定(矩阵)(矩阵集)的整洁方法?有更好的方法吗?
我正在使用SQLite作为数据库。
I want to be able to store some 100x100 matrices onto a table within my database (covariance matrices). A first good step for me would be to flatten the matrix and store the matrix structure (among other things) into a parent table.
However, creating such a table would require to make a table with about 10,000 or so columns. Writing so many field names would make my SQL code extraordinarily large, and I wouldn't know where to start if I want to query for that matrix.
Is there a neat way to specify such a table in SQL? Is there a neat way for me to set or get a particular (set of) matrix (matrices) from my database using such a table? Is there a better way?
I am using Sqlite for my databases.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有具有相同类型列的大尺寸的表都可以旋转。
例如,如果您的表格有这样的表格:
旋转带有3个colums的表
简单地
可以
您 处理。
All tables with big size of same typed columns can be rotated.
For example if you have a table A like this:
You can simply rotate to a table with 3 colums
so instead of writing big sql like
you write sql like
the result set was originally horizontal and now become vertical -- it is rotated and easy to handle.