I really need to create a small DB for doing only SELECT querys in my app. Because of that I would like to know:
- Does android provide something for design and fill a DB? I mean no programming. Something like phpmyadmin so I could fill it and make a relation between 2 tables before running the app in an emulator or a phone.
- If I create a DB, will it be visible from some file in the user mobile phone? Because I read in android manual that it was invisible but in some places I read that it’s saved in the mobile… I would prefer that this DB would be like a resource like it can be a layer or a string.
- If I really need to create a DB each time the app is displayed for present the same information always, could I just “upload a sample” of that database in one line of code or so?
I need this for display a big list of items (maybe 2000 items) in different languages. I could do that just creating an array string resource but I need to order the list in a different way depending on the location of the user. At the end I need to retrieve an “ID” of the items selected but because it’s impossible to do a 2D array string as a resource then I can’t assign a number to the items so I can only know their positions in the list. The problem is that if I alter the items I will have a mismatch of positions numbers as ID.
This array is for an autofill text. I know I can put a comma after each item with the number and before adding this array to the autofill do a split and select the first column for the autofill and the second for compare position to real ID but I thought it would have a better performance to have all in a DB. Am I wrong?
You can use Sqlite Browser to create a database
It depends on where you create. Usually if you open a database it will be created in /data/data/[yourpackagename]/databases . This folder is incaccessible in normal cases, but if you have a rooted phone you can access this folder. Also while creating you could change the path to sdcard which is accessible everytime
You could store the db in assets folder of your app and open it.
Edit:
If it is just a 2D array i think its better to save as a csv and extract. You could put it in assets or raw folder.