Import already populated sqlite database

4

I'm making an app need to do only queries on a database. As this is a very large amount of data, I think it would be counterproductive to feed this database using an insertOrThrow for each item in a table. I do not know the best way to do this, so I'm doing a "blind" procedure here, but it's not being very effective. To insert this data I used the SqliteStudio utility. Anyone there ever done such an operation? Which database manager do you suggest for use? I'm having trouble importing this manager-generated database into the Android Studio project. From what I've researched, you need to create a folder named Assets in the project and put the database in there.

On the import, I found information to use the InputStream class, but I could not load the file information. During execution, in the procedure to list the data, it enters cath and says that no table was found in the database. The biggest goal of this question is to get advice on how to perform a bulk data insertion operation on a database and use it for browsing through Android Studio. Anyone who can contribute, thank you. Thank you!

    
asked by anonymous 17.09.2015 / 23:52

1 answer

1

Good afternoon Fabio, I believe that inserting with insertOrThrow is not a problem. I built an application that the first synchronization it inserts about 40 thousand records.

I have not encountered a problem regarding this so far, as I make this process delayed only the first time.

It has been running on dozens of devices for about 20 months.

    
28.09.2015 / 18:52