商店的Andr​​oid的SQLite商店、Andr、SQLite、oid

2023-09-11 12:21:47 作者:做你心上人

我有一个SQLite数据库会被填充从Web服务与intially 1000记录,那么我将每个我需要做一次插入多个记录在里面。我的问题是在哪里存储在设备中的SQLite数据库的方式保持插入(无论是在内部或外部存储器),即如果我存储在内存中的数据库,当内存被填满,我可以将它移动到外部,并保持插入或如果我将其存储在外部存储和外部存储得到填补,并没有在内部可用空间,我可以移动到内部,并保持插入数据..我很困惑这个你能帮助我 任何建议或链接请

I have a sqlite database that gonna be filled from a webservice with intially 1000 record , then i will insert more record in it each time i need to do. my question is where to store the sqlite database in device in a way to keep inserting ( either in internal or external memory) i.e if i store the database in internal memory and when a internal memory get filled i can move it to external and keep inserting OR if i store it in the external storage and the external storage get filled and there is an available space in internal i can move to internal and keep inserting data .. i am very confused about this can you help me any suggestion or links please

推荐答案

以下的答案我给在根据我个人的经验。

Following Answer I am giving on the based on my personal experience.

第一条建议(内部/手机记忆体)

当您在内部存储器存储的数据库,那么对于性能是非常不错的。因为你的应用程序将被安装在内部存储器中。所以在执行1000记录等记录应用程序会更容易地访问数据库。应用程序的性能会非常好看。但是,当涉及到内存的限制时,内置记忆体将得到填补绰绰有余那么你的设备的性能会有所回落。所以内存最好到中等级别的数据库。

When you are storing database in Internal Memory, Then for the Performance it is very good. Because your Application will be installed in the Internal Memory. so while performing 1000 Records and other record for the application it would be more easier to access the database. Application's performance will be very nice. But when it comes to Memory limitations when Internal Memory will get filled more than enough then your device's performance will be down. So Internal Memory is best till medium level database.

第二项建议(外部存储器,SD卡)

当你存储在数据库外部存储像SD卡,然后在性能,应用程序性能的会比内存慢一点。然而,这不能被识别而有数据库的中等水平的记录。当有极少数的数据,那么性能会在这两个情况相同。现在,当您使用的是外部存储器,那么你的数据存储的大尺寸。我不认为它会永远充满十足。但是,如果对大量记录的性能会下降。有时,它可能的应用程序崩溃。

When you are storing database in external Memory like SD Card, then for performance , application performance’s will be bit slower than Internal Memory. However this can't be recognize while there are medium levels record of database. When there are very few data then performance will be same in both the case. Now when you are using External Memory, then you have large size of data storing. I do not think it will never filled full. But in case of large number of records performance will be down. Sometimes it may be possible of application crash.