what is the best way to store data locally. Assuming that I'm creating an app that stores transaction and I need to save id(because they may be many transactions with the same name), title, amount and time. Can I do it with shared preferences or is there another way to do it ? Thank you for answering.
CodePudding user response:
Shared Preference let you read and write key-value pairs in a couple of lines easily. but shared preference is not a solution for you to keep complex data. you should keep those data in a Database.
There are two major types of options you have:
- Relational — these are the databases in the traditional sense. They don’t just store data but also the relationships between the data. SQLite is an example of a relational database.
CodePudding user response:
You may like Hive Hive is a powerful database, if you're looking for great performance this is it