简体   繁体   中英

is it a good way to store data in list array

I am learning android and currently i am working on an android app, whose one tab is reserved for storing medicines and their description like there will be a list of medicines and when user click any item , he will get the description.My question is that , is it a good practice to store the values of medicines and their description as a list of objects? Are their dis-advantages of using this method to store data?

这取决于您拥有的数据量。如果将其大量存储在db中,并在需要时填充。

Using a SQlite database is a possible solution for storing the list of medicines. Using a database will scale well over time as the number of medicines increase. Below is a link to the android related sqlite database API's.

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

I use that approach on most of my projects and i never found and issue with it. I even made an app involving contacts, wich deals with a considerable amount of data (given de way contact API works) and it works smoothly so my answer would be yes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM