Database or File-Handling [closed] - android

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
To put a lot of searchable text in a software, what would be the best method, database or File-Handling system? Keeping in mind that the text is an Asian language with right-to-left orientation. Platform is Windows and Android.

Database is the better option. It has structured format of all your stored datas. Database allows you to fire queries and search for a particular text you want. You can store and fetch data very easily and with good performance speed. You can also delete any unwanted texts which is easy part.
Now incase of File, It is unstructured format kind of data. All your data gets stored below one another in line by line or. Fetching a particular word from bunch of whole paragraph is tedious job. Even You need to hold whole file's object all the time, which occupies more memory.

Related

A stamp board using a DB [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm going to make a stamp board. If I enter a specific password, it will be stamped in a specific area corresponding to that password. I think this app. need a DB to remember that a certain area has been stamped. I think I can choose Internal Storage or Shared Preference to implement this function. Which is easier and suitable for the features I want to create?
I think according to your need the mysql will be the best choice because generally, shared preference in used to store small value like username, passwords or some constants.Whereas the sql is a proper database with queries to help you get data from your stomp board.
One more database is realm database which is based of sql only and is much better and faster.hope it helps

How to store data for a to-do list app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am new to android programming and I'm currently working on a todo list app. I would like to store the name of the task and if it is completed or not. Later I might add things like priority or a date when the task has to be finished. I'm just unsure which method of storage i should use. Would SQL, JSON, XML or maybe something else like a CVS file be best fitted for the task?
You don't have to show me how to implement that method, I am just curious which method would be best suited.
Tanks for all answers
As for me, if you want some addition scalability from your app in future - it's better to use database. Preferences are not for storing large amount of data, but maybe they take less time for implementation. Don't store in xml/json if you are going to increase stored fields count, it would be a mess after some time.
If it's some kind of self educational project maybe you would like to use firebase or maybe realm, but it's only if you want to get something new. SQLite would be enough too.
This is more of a pref. Question. But, XML is pretty much the standard.

Best way to store / retrieve huge amount of unique strings in android [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I want to write android application. This Application will show all words, which matches user defined pattern.
So I need to choose storage , to store 300 000 unique words (6-8 MB in size)
There are criteria to consider:
regex support (like operator is not sufficient)
performance
data must be stored locally
Unfortunately, Sqlite database doesn't have regex support.Shared Preferences has memory problems (I can't save 6-8 MB data in them).
Can someone point me on correct && optimal way?
Dump you data in a local file in the /data/data/your.package.
Build an AsyncTask and execute with:
executeOnExecutor(java.util.concurrent.Executor, Object[])
Method above invokes true parallel execution. More on the subject can be read here : AsyncTask.
If your goal is real-time performance, design the application in way, where the user doesn't notice the work going in the background (this is the not so technical aspect of the question).

Which is faster? SharedPreference or File in android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have Long Text that I've saved it in file. My Question is if I Read Directly from file is Fast or for First time I save it in SharedPreference and for next time I read from SharedPreference is Fast?
I don't think that speed will be your only concern. If it is, than Sharedprefs looks faster too me. However you are talking about millisecs difference here.
To be sure, use log to capture time and start measuring.
You should be more concerned about other stuff, like the amount of data you are going to write, the sort of data. Etc. etc.
SharedPrefs is faster,basically it store the value with key pair.you can't do everything in Sharedprefs.u have to choose depends upon requirements
for more details go to the link
http://developer.android.com/guide/topics/data/data-storage.html

How to create a searchable list [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would like to have a database of items stored on the user's phone. I currently have everything set up using WebView pointed at my domain, but obviously this isn't ideal if the user is in a low-signal location.
If possible I would also like to be able to search the list for multiple words.
Any pointers to tutorials etc would be ideal.
In Android you'll want to use SQLite databases, here are some places from where I learned my way with databases in Android:
Start here:
http://www.codeproject.com/Articles/119293/Using-SQLite-Database-with-Android
Or here if you want to use an existing database:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
If you decide on XML, though, you might want to read this instead:
http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser
Here you have a tutorial involving both methods, downloading data in XML format, parsing it and storing the information on a database, probably the guide you want to read if you're starting with Android, since it covers pretty much what you are trying to achieve, probably :P
http://mobile.tutsplus.com/tutorials/android/android-fundamentals-downloading-data-with-services/

Categories

Resources