Advise on which database on Android Studio and Kotlin
I am struggling on developing an app using Kotlin using Android Studio.
The app will have 50-100 keys/ids (lines) with each row containing ~10 pieces of data (name, dates, etc.), that can be searched through and the results shown on the app.
As I would like this to be fairly simple, what database should I be using? XML, SQLite, MySQL, etc?
Are there any simple examples that I could use please?
Really appreciate any help.
If you're looking for an offline/local database, you can use room DB instead of SQLite to avoid usage of too much boilerplate code to convert SQL queries and data objects.
You can check this link
https://developer.android.com/training/data-storage/room
Related
I am looking at migrating a native Android project from an SQLite database to an ORM. I have considered what I believe to be the fastest current contenders - DBFlow (based on SQLite) and Realm.
Therefore, out of curiosity, does anyone know what sort of data format Realm is using? Having read their documentation, this is seems to be a pretty closed subject and I could not find anything on the matter.
From their site - Realm is not an ORM on top of SQLite. Instead it uses its own persistence engine and their source code is open for java.
https://github.com/realm/realm-java
I am creating an android app, UI/UX and andoid work are finished. I am new to database setup. Can anyone tell me which type of database I should use to store descent amount of data like signup details and app using details. Should I use DBMS or RDBMS or SQlite? help me. Thank you.
In my point of view , you have to use SQLite for android apps.
There are several benefits in SQLite like :
SQLite is embedded into every Android device.
Using an SQLite database in Android does not require a setup procedure or administration of the database.
You only have to define the SQL statements for creating and updating the database. Afterwards the database is automatically managed for you by the Android platform.
I have a SQL Database containing 24 Columns and about 24000 Rows. I want to retrieve data from that SQL Database. I am new to Android and don't know how to use it.
I found an Android library called Realm but I couldn't find a way of Converting SQL to Realm Database.
If there is a simple way to read data from and to store data in SQL Database or another way of storing data in Android in form of Database, please let me know.Any Help will be appreciated.
Thanks!!
android uses SQLite. This is very similar to SQL. You would only need to have the app download the data from the server database and copy in into the local database.
SQLite information can be found at http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html
Converting from an SQL file has been discussed at Convert MySQL to SQlite
Android comes with SQLite, this is what you should use. did you search anything like "Android and sql"? android training on the subject
Edit:
so you dont have an sql file, you have an online MySql database. can use jdbc but it is not widely recomended. there are some alternatives as in here and here
Not sure if this will help, but . . .
I have been playing around with different programming options for my Android tablet. One is RFO Basic! freely available from the Google store. It seems to be a dialect of Dartmouth Basic with a lot of built-in hooks to Android specific functions (GPS, camera, etc) as well as an interface to SQL. The set of example programs that comes with the distribution includes and SQL example.
Being a Basic-language environment it will (1) be easy to learn but (2) probably slow (very slow) on a 24000 row table..
Hope this helps
I am not sure if anyone has ever tried this. I am currently storing attributes in a sqlite database on android. What I want to do next is to retrieve these data and apply Machine learning algorithms implemented by Weka. Weka can indeed take data from databases using JDBC. But can this be done with android? The SQLite database in android doesn't seem to be a normal SQLite databse.
I have read this http://weka.wikispaces.com/How+do+I+connect+to+a+database%3F, but it doesn;t help much.
Thank you
I do not think there is a ready implementation for Weka to read the data from sqlite on Android, because the helper class mainly depend on JDBC which is not available for android.
I can think of two options to achieve this:
Query the sqlite database on Android and create Weka training instances programatically on the fly. This solution might be more suitable for online training and when you have large dataset.
Export the training data from sqlite as csv file and pass the file to Weka for training.
It seems that WEKA won't work on Android without changes. J48, for example, requires the java.lang.Cloneable interface, which is not available in Android.
This is a weka port to android project here.
Hope it will help you.
I'm currently trying to learn how to use a SQLite database with android. I've managed to successfully follow http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/ but I'm now looking to make a table with 25-30 fields. It seems like it would be a huge task to type out all this in a similar style to that link especially as I'd want to be able to search by many of those fields.
Is there something I can use to automatically generate a database helper class with this number of fields and methods to search them? Or am I going about this completely the wrong way?
Thanks
First off i just recently started android programming also and i particularly enjoyed this tutorial about databases : http://www.vogella.de/articles/AndroidSQLite/article.html
To generate the queries i think it will be better you use an SQLite Database Manager and just copy and past your queries in the methods.