C
C
Chvalov2016-04-12 18:34:11
Java
Chvalov, 2016-04-12 18:34:11

Is it mandatory to use an ORM to work with SQLite?

Previously, I worked with SQLite current on a droid using examples from the network of which there are a lot (connected with the database and Android).
But for pure java, it's mostly foreign and mostly using ORM & jdbc and other rubbish.
And everyone uses different databases, who are MySQL and who are PostgreSQL in general.
I am not familiar with ORM and other things, who can tell me what to read and what to use for convenient work with SQLite?
And also where and what is hibernate used for?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2016-04-12
@gadfi

if you write for the web, then yes rather than no, ORM is a good practice when working with a database, at least you cannot guarantee that you will not have to change the database during the development of the project .. if you use ORM, then this process will be less painful, besides on the web, you have to write dynamic queries much more often, and in general there is much more work with the database, so ORM has long become the standard.
As for sqlite, this is primarily a database for applications (not only mobile ones),
but now about android - this is a matter of taste, personally, I don’t like the existing ORMs for android, I would be more than happy to use some kind of builder for requests to the ContentProvider (there are a couple, but the last time I looked it was damp)
from my practice, I once wrote an application with a bunch of settings, input fields, checkboxes, spinners, etc., any change in the settings had to be shown to the user immediately - the ContentProvider did an excellent job, but the section of code responsible for generating the request was terrible, it was a long time ago, today would for this task, I would probably use some kind of orm and rxjava
from orm for android is most pleasant in terms of ormlite functionality, but it has not been updated for a long time and is quite slow
realm.io - never sqlite but real nosql, due to this it decently wins in speed, this is where its pluses end for me, I don’t recommend it, although this is just my IMHO, I don’t impose it, someone even likes it, but it’s big some of the people who worked with it a little more than launching hello world agree with me (again, my
IMHO , someone may have different statistics )

E
Eugene, 2016-04-13
@zolt85

If you want to understand the issue, take pure JDBC and work through it. Then you can already crawl to the ORM. Moreover, SQLite is not a super fancy DBMS. But if you take some H2 , HSQL or JavaDB as a DBMS , then the choice of ORM expands to Hibernate, Mybatis and others

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question