问题描述
嗨,伙计们,Android在某些设备上的文件系统空间有一些严重的限制,一旦我的SQLite DB文件大小生长到5MB以上,我的应用程序就会开始给我错误,我尝试运行Vaccum Command
我正在考虑将我的数据跨多个sqlite文件分开,以将它们分解为较小的DB文件,以便我可以简单地删除适当的sqlite文件.
这样,我的主sqlite文件永远不会变得太大,我从不需要吃vaccum
时需要吃空间但是,我想知道是否有一种方法可以使内在连接通过多个SQLITE文件(使我的主sqlite文件中的主要数据)和二级数据跨不同的sqlite文件
划分如果在sqlite中不可能,那么我想我将不得不回顾一下与GZML XML文件一起使用的东西: - (
推荐答案
使用附加数据库查询SQL中的多个数据库: http://wwwww.sqlite.org/lang_attach.htach.html
其他推荐答案
不同的数据库意味着它们是不同的"事物".您可以查询一个db,他们查询另一个数据库并加入代码中的两个结果(即使包含在y上的x).但是Afaik,仅使用SQL就不可能做到这一点.
问题描述
hey guys android has some serious limitations with file system space on certain devices and my app starts giving me errors once my sqlite db file size grows beyond 5mb and i try to run the vaccum command
i am thinking to separate my data across multiple sqlite files to break them into smaller db files so that i can simply delete the appropriate sqlite file when its data becomes obselete
that way my main sqlite file never grows too big and i dont ever need to eat up space when doing vaccum
however i wanted to know if there is a way to make inner joins work across multiple sqlite files (such that the primary data is there in my main sqlite file) and secondary data split across different sqlite files
if this isnt possible in sqlite then i guess i will have to recode stuff to work with gzipped xml files :-(
推荐答案
Use ATTACH DATABASE to query more than one database in your SQL: http://www.sqlite.org/lang_attach.html
其他推荐答案
Different databases means that they are different "things". You could query one db, them query the other db and join the two results in code (even if that includes join X on Y). But AFAIK, it's impossible to do that using sql only.