I need to pre populate a database with large amoun...
# android
p
I need to pre populate a database with large amounts of data.
😶 4
u
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
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?