What database skills do I need for Android app development?

  • Thread starter Thread starter fireflies
  • Start date Start date
  • Tags Tags
    Android App
AI Thread Summary
The discussion centers on developing an Android app with a tight deadline, focusing on user data storage and navigation. The user seeks advice on whether to learn database programming or use simpler alternatives due to time constraints. Suggestions include utilizing property files for storing notes, which can handle up to 10,000 keys efficiently, and exploring apps like APDE and AIDE for on-device development. The conversation also touches on the potential need for database knowledge, mentioning SQLite and JSON parsing as relevant topics. The consensus leans towards property files for quick implementation, with a note that transitioning to a database later is feasible. Parsing data is clarified as a separate concept from database management, primarily involving string analysis. Overall, the emphasis is on practical solutions that align with the project’s immediate requirements.
fireflies
Messages
210
Reaction score
12
Hello, I am working on my varsity project on an android app development. Due to procrastination and sometimes, yeah, for being busy the deadline is this Thursday. So, less than three days remaining. I had no idea about android app... Last day, I learned layout. So, I made the layout of the pages and done navigation. But still I have to store information the user puts so they can see them on future. By searching with date/ location they need to find it. Maybe I need to learn database about it. Can anyone give me any suggestion where to headstart? And also specific what things about database I need to learn to cover all I need in an android app? Furthermore, what is APK? is it related to database? Where to learn? And what to star first? Learning APK or Database?? Do I need learning PHP?

Any help is appreciated :)

edit: If the information helps... the information that users are going to save in my app is like notes. So, it can be any range. (Maybe I will limit later, but still a large range)
 
Technology news on Phys.org
You realize that this is an impossibly short time to install, configure and learn database programming, right?

My suggestion is to use a property file instead. You can load and save it. You can use a simply string key to retrieve or store data and there is a simple way to walk through your list of keys should you need to select and report on multiple keys such as all notes written this month instead on a certain date and time.

https://developer.android.com/reference/java/util/Properties.html

Each keys value would be a note.

You should also look at the app APDE which will allow you to develop on the device using the Processing programming model ie setup() and draw() methods, alternatively you could use the AIDE app which allows you to develop more complex apps on the device and is comparable to the Android Studio. You going to have to decide on this. Perhaps your classmates can help you here. Also the device you’re using may need developer mode turned on to give you the right environment to debug.
 
  • Like
Likes fireflies
Property File? Okay, checking that out. But I heard only some basics of database programming is needed here?
 
Here's a tutorial on Android App development using a SQLLite database:

http://coenraets.org/blog/androidtutorial/

It looks dated though as Google has suggested folks use the Android Studio for development.

If I were you, I'd go the property file route unless your teacher has specified that you must use a database. Property files work well for upto 10,000 keys. Be aware though that the property file when loaded resides completely in memory meaning your device's working memory may limit its size.

I imagine that a 1000 notes would work okay. Say each note was 1000 characters then you'd need 1MB of memory to hold all of your notes.
 
Here's some more options:

https://developer.android.com/guide/topics/data/data-storage.html

Basically, instead of using a database you design a filesystem directory structure. As an example:

./my-notes/2017/12/04/note-14-15-30.txt

for a note written on 12-04-2017 at 14:15:30 save in file note-14-15-30.txt

You could then develop filesystem methods to show all notes in some subdirectory ./my-notes/2017/12/04 ...
 
Property File sounds cool. I limited one note to 500 characters, and 5 other notes to 35 characters each. So it is great for me. Just tell me one thing, when I need to update.. Would it be much hard to convert it all to database?
 
I don't think so. You'd load the property file and get an iterator for the property keys then walk the list of keys, retrieve your note and then use the database insert (via a JDBC execute statement) to place it into the database. This would be a one-time operation.
 
Our teacher did not limit it to database, but he talked about json parsing (and also said using some built-in option it can be done easily) and asked us whatever he taught we should implement them in our apps.

Sadly, I could not fully attend those classes, so missed. He taught about parsing data. Are those database things?
 
  • #10
Iterating? Won't it take much time to show the notes then?
 
  • #11
Parsing data is more about analyzing string content not about database actions. You might want to parse a string to see if it has any keywords that you've defined so you could mark the note as being related to some topic.

Iterating means using a loop to look at each note in your collection.

Code:
for  (String notekey : notes.keys() ) {
      String notetext  = notes.getProperty(notekey);
      System.out.println(notetext);
}

or something like this.
 
Back
Top