I need to pre populate a database with large amounts of data.
๐ถ 4
u
Umar Ata
04/09/2022, 8:35 PM
Hi @paul vickers,
Please read the channel description.
Also you see people putting ๐งต to ask you to put more details in just one thread and not put multiple different messages, people also marked ๐ถ to tell that your question is not directly related to Kotlin for which this channel is created.
But don't worry, you will learn the best practices here for sure.
Coming to your problem
What kind of data you want to pre filled in your app ?
Do you have a location or dictionary data ?
Well my suggestion to pick room with SQL file that has data pre filled in it if you have structured data otherwise you can put a simple text file in raw or assets folder and read it accordingly.
Third option would be to download it from sever via api and then store it in app.
p
paul vickers
04/09/2022, 9:49 PM
I am trying to prepopulate multiple tables into a Room database f a workout app. I was using DB Browser for SqLite and then loading it from assets, but then thought it maybe easier to write my data in Kotlin lists, would that not be something that's done?