I am confused the which one good for android perspective either Ormlite
or sqlite
.
please can you give me suggestion which one is better for use our android app. And makes easy to use and supported all android devices?
I want to use the ormlite in our project but before i want to sure that it will be helfull for me and my app. So please guide me if any one used earlier this. I much appreciate your thought here.Thnaks
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
ORMLite has two .jar files : ormlite-core.jar (275KB) and ormlite-android (50KB) libraries
Advantages :-
Use for complicated database operations
No need to remember to SQL queries
Prefer for big size application
Disadvantages :-
Unnecessarily increase size of application
Little bit slow with compare to greenDao(another ORM)
You can also choose to look at Storm (https://github.com/supaldubey/storm/)
It provides neat interface and does not asks to override or implement any base classes for the Models.
It also would auto create and auto upgrade your models
You can add to Gradle and start using easily
In parent:
maven { url "http://dl.bintray.com/cubestack/maven" }
In project Gradle:
Step 1: Define tables:
Step Two (Define the Database)
Database also have their annotation which can be applied, there can be multiple databases defined.
Step Three (Start Using)
With database ready for us, we may start using it as below:
Retrieval
Similarly it has methods to save, delete etc.
ORMLite is an open source software framework that provides lightweight object relational mapping (ORM) between Java classes and SQL databases.
if you use this framework you are ultimately using sqlite database (ORMLite is no database),it allows you to implemet a good architecture to your application, I always prefer using ORMLite
Here is my blog on ORMLite if you want to get started with it!!
Although other answers are perfect but I want to mention another aspect about using ORMs such as Ormlite vs SQlite.
ORMs (such as Ormlite) are good to use because they reduce amount of work and code but I've read this and I mention the opinion here: