在多个sqlite的DB文件加入多个、文件、sqlite、DB

2023-09-07 08:42:52 作者:大陆产

嗨机器人具有在某些设备上的文件系统空间,一些严重的局限性,我的应用程序启动一次我的SQLite数据库文件的大小超过5MB给我的错误,我尝试运行真空命令

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

这样我的主要sqlite的文件永远不会增长得太大,我不以往任何时候都需要吃空间做真空时

that way my main sqlite file never grows too big and i dont ever need to eat up space when doing vaccum

不过,我想知道是否有一种方法,使内部连接在不同的sqlite的文件在多个源码文件的工作(例如,主数据存在在我的主源码文件)和次要数据分割

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

如果这个心不是可能的sqlite的话,我想我将不得不重新code的东西用gzip压缩的XML文件的工作: - (

if this isnt possible in sqlite then i guess i will have to recode stuff to work with gzipped xml files :-(

推荐答案

使用附加数据库在您的SQL查询多个数据库: http://www.sqlite.org/lang_attach.html

Use ATTACH DATABASE to query more than one database in your SQL: http://www.sqlite.org/lang_attach.html