My application collects data about the battery.
I need to be able to edit this data with add/remove options.
What is the most suitable way to store this data? I though about two ways: XML file or data-base using SQL.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use SQLite Database for this. I assume battery data is a lot of entries of well defined format (i.e. charge level, current temp, timestamp and so on). And this is a classic example when databases should be used.
XML is too resource heavy for potentially large amount of data, that should be editable. Also XML will not provide you with relatively easy to use select statement for data analysis. You’ll need to load all data into memory and select data manually.