ORMLite with Android DB Connection
up vote
1
down vote
favorite
I have a server and I am using ORMLite for the connection with the server, however I had seen the examples but in the task of creating the connection don't know how to do it without using JDBC.
// create a connection source to our database
ConnectionSource connectionSource =
new JdbcConnectionSource('jdbc:mysql://internetserver/');
I had seen a lot of posts that says how JDBC is not right in Android but I see no examples and no updated posts that explains the best/most correct way to do a DB connection for an ORM with Android. Just to make you know, my idea are shops with data alocated on the cloud, and then to take that information and create the objects that are active in the DB.
android sql-server android-studio database-connection ormlite
add a comment |
up vote
1
down vote
favorite
I have a server and I am using ORMLite for the connection with the server, however I had seen the examples but in the task of creating the connection don't know how to do it without using JDBC.
// create a connection source to our database
ConnectionSource connectionSource =
new JdbcConnectionSource('jdbc:mysql://internetserver/');
I had seen a lot of posts that says how JDBC is not right in Android but I see no examples and no updated posts that explains the best/most correct way to do a DB connection for an ORM with Android. Just to make you know, my idea are shops with data alocated on the cloud, and then to take that information and create the objects that are active in the DB.
android sql-server android-studio database-connection ormlite
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a server and I am using ORMLite for the connection with the server, however I had seen the examples but in the task of creating the connection don't know how to do it without using JDBC.
// create a connection source to our database
ConnectionSource connectionSource =
new JdbcConnectionSource('jdbc:mysql://internetserver/');
I had seen a lot of posts that says how JDBC is not right in Android but I see no examples and no updated posts that explains the best/most correct way to do a DB connection for an ORM with Android. Just to make you know, my idea are shops with data alocated on the cloud, and then to take that information and create the objects that are active in the DB.
android sql-server android-studio database-connection ormlite
I have a server and I am using ORMLite for the connection with the server, however I had seen the examples but in the task of creating the connection don't know how to do it without using JDBC.
// create a connection source to our database
ConnectionSource connectionSource =
new JdbcConnectionSource('jdbc:mysql://internetserver/');
I had seen a lot of posts that says how JDBC is not right in Android but I see no examples and no updated posts that explains the best/most correct way to do a DB connection for an ORM with Android. Just to make you know, my idea are shops with data alocated on the cloud, and then to take that information and create the objects that are active in the DB.
android sql-server android-studio database-connection ormlite
android sql-server android-studio database-connection ormlite
asked Nov 8 at 8:27
Maespi
155
155
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I have not worked with ORMLite for a long time (it's too old, weak and leak of documentation). On Android you don't use JDBC to create database connection.I will give you some suggestions:
- To make a database connection on Android, we have SQLiteOpenHelper. You can read further information from: https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper. But now a day, no one wants to execute raw queries.
- There are some strong ORM libraries that you can choose:
- Active Android: https://github.com/pardom-zz/ActiveAndroid. Easy to use, just configure database name, version, schema and use.
- Realm: https://github.com/realm/realm-java. It's not SQLite, you can use for both Android and iOS.
- Room: https://developer.android.com/topic/libraries/architecture/room. Introduced by Google (Recommended)
New contributor
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I have not worked with ORMLite for a long time (it's too old, weak and leak of documentation). On Android you don't use JDBC to create database connection.I will give you some suggestions:
- To make a database connection on Android, we have SQLiteOpenHelper. You can read further information from: https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper. But now a day, no one wants to execute raw queries.
- There are some strong ORM libraries that you can choose:
- Active Android: https://github.com/pardom-zz/ActiveAndroid. Easy to use, just configure database name, version, schema and use.
- Realm: https://github.com/realm/realm-java. It's not SQLite, you can use for both Android and iOS.
- Room: https://developer.android.com/topic/libraries/architecture/room. Introduced by Google (Recommended)
New contributor
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
add a comment |
up vote
1
down vote
accepted
I have not worked with ORMLite for a long time (it's too old, weak and leak of documentation). On Android you don't use JDBC to create database connection.I will give you some suggestions:
- To make a database connection on Android, we have SQLiteOpenHelper. You can read further information from: https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper. But now a day, no one wants to execute raw queries.
- There are some strong ORM libraries that you can choose:
- Active Android: https://github.com/pardom-zz/ActiveAndroid. Easy to use, just configure database name, version, schema and use.
- Realm: https://github.com/realm/realm-java. It's not SQLite, you can use for both Android and iOS.
- Room: https://developer.android.com/topic/libraries/architecture/room. Introduced by Google (Recommended)
New contributor
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I have not worked with ORMLite for a long time (it's too old, weak and leak of documentation). On Android you don't use JDBC to create database connection.I will give you some suggestions:
- To make a database connection on Android, we have SQLiteOpenHelper. You can read further information from: https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper. But now a day, no one wants to execute raw queries.
- There are some strong ORM libraries that you can choose:
- Active Android: https://github.com/pardom-zz/ActiveAndroid. Easy to use, just configure database name, version, schema and use.
- Realm: https://github.com/realm/realm-java. It's not SQLite, you can use for both Android and iOS.
- Room: https://developer.android.com/topic/libraries/architecture/room. Introduced by Google (Recommended)
New contributor
I have not worked with ORMLite for a long time (it's too old, weak and leak of documentation). On Android you don't use JDBC to create database connection.I will give you some suggestions:
- To make a database connection on Android, we have SQLiteOpenHelper. You can read further information from: https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper. But now a day, no one wants to execute raw queries.
- There are some strong ORM libraries that you can choose:
- Active Android: https://github.com/pardom-zz/ActiveAndroid. Easy to use, just configure database name, version, schema and use.
- Realm: https://github.com/realm/realm-java. It's not SQLite, you can use for both Android and iOS.
- Room: https://developer.android.com/topic/libraries/architecture/room. Introduced by Google (Recommended)
New contributor
New contributor
answered Nov 8 at 9:28
Louis Solo
862
862
New contributor
New contributor
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
add a comment |
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
And How it would be for a remote Database?
– Maespi
Nov 8 at 19:19
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
If you want to store your data in cloud, you can use Firebase storage.
– Louis Solo
2 days ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203880%2formlite-with-android-db-connection%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password