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.
我有一个包含24列和大约24000行的SQL数据库。我想从该SQL数据库中检索数据。我是Android新手,不知道如何使用它。
I found an Android library called Realm but I couldn't find a way of Converting SQL to Realm Database.
我发现了一个名为Realm的Android库,但我找不到将SQL转换为Realm数据库的方法。
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.
如果有简单的方法从数据库中读取数据和在SQL数据库中存储数据或以数据库的形式在Android中存储数据的另一种方式,请告诉我。任何帮助将不胜感激。
Thanks!!
3 个解决方案
#1
2
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.
android使用SQLite。这与SQL非常相似。您只需要让应用程序从服务器数据库下载数据并将其复制到本地数据库中。
SQLite information can be found at http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html
SQLite信息可以在http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html找到
Converting from an SQL file has been discussed at Convert MySQL to SQlite
转换MySQL到SQlite已经讨论了从SQL文件转换
#2
2
Android comes with SQLite, this is what you should use. did you search anything like "Android and sql"? android training on the subject
Android附带SQLite,这是你应该使用的。你搜索过像“Android和sql”这样的东西吗?关于这个主题的android培训
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
编辑:所以你没有一个sql文件,你有一个在线MySql数据库。可以使用jdbc但它没有被广泛推荐。在这里和这里有一些替代品
#3
0
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..
我一直在玩Android平板电脑的不同编程选项。一个是RFO Basic!可从Google商店免费获取。它似乎是Dartmouth Basic的一种方言,它具有许多内置的Android特定功能(GPS,相机等)以及SQL接口。分发附带的示例程序集包括SQL示例。作为一个基本语言环境,它将(1)易于学习,但(2)可能在24000行表上缓慢(非常慢)。
Hope this helps
希望这可以帮助
#1
2
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.
android使用SQLite。这与SQL非常相似。您只需要让应用程序从服务器数据库下载数据并将其复制到本地数据库中。
SQLite information can be found at http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html
SQLite信息可以在http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html找到
Converting from an SQL file has been discussed at Convert MySQL to SQlite
转换MySQL到SQlite已经讨论了从SQL文件转换
#2
2
Android comes with SQLite, this is what you should use. did you search anything like "Android and sql"? android training on the subject
Android附带SQLite,这是你应该使用的。你搜索过像“Android和sql”这样的东西吗?关于这个主题的android培训
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
编辑:所以你没有一个sql文件,你有一个在线MySql数据库。可以使用jdbc但它没有被广泛推荐。在这里和这里有一些替代品
#3
0
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..
我一直在玩Android平板电脑的不同编程选项。一个是RFO Basic!可从Google商店免费获取。它似乎是Dartmouth Basic的一种方言,它具有许多内置的Android特定功能(GPS,相机等)以及SQL接口。分发附带的示例程序集包括SQL示例。作为一个基本语言环境,它将(1)易于学习,但(2)可能在24000行表上缓慢(非常慢)。
Hope this helps
希望这可以帮助