What database skills do I need for Android app development?

  • Thread starter Thread starter fireflies
  • Start date Start date
  • Tags Tags
    Android App
Click For Summary

Discussion Overview

The discussion revolves around the database skills needed for Android app development, particularly in the context of a varsity project with a tight deadline. Participants explore various methods for storing user-generated notes, including database programming, property files, and filesystem structures, while also addressing related concepts like APK and JSON parsing.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses urgency in learning database skills for an Android app project due soon, seeking guidance on what database concepts to focus on.
  • Another participant suggests using a property file instead of a database, highlighting its simplicity and ease of use for storing notes.
  • A third participant provides a tutorial link for using SQLite databases in Android, but also recommends property files for smaller data sets.
  • Participants discuss the feasibility of using a filesystem directory structure to store notes, presenting it as an alternative to databases.
  • One participant questions the difficulty of converting from a property file to a database later on, seeking clarity on the process.
  • Another participant explains that iterating through notes stored in a property file would not be overly time-consuming, providing a code example for clarity.
  • There is mention of JSON parsing as a relevant topic, with some confusion about its relation to database actions.

Areas of Agreement / Disagreement

Participants present multiple competing views on the best approach to data storage, with no consensus reached on whether to use a database, property files, or filesystem structures. The discussion remains unresolved regarding the optimal method for the participant's project.

Contextual Notes

Some participants note limitations regarding the size of data that property files can handle effectively, as well as the potential memory constraints when loading data. There is also uncertainty about the relationship between JSON parsing and database operations.

fireflies
Messages
210
Reaction score
13
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)
 
  • Like
Likes   Reactions: kousar441
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   Reactions: 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.
 
  • Like
Likes   Reactions: kousar441
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.
 

Similar threads

Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
Replies
7
Views
3K
Replies
11
Views
2K
Replies
5
Views
3K