Built-in Java SQL Database

I am looking for a small embedded SQL database for Java. Something like SQLite, but it should be pure Java. So far I have seen HSQLDB, H2 and Apache Derby, but they are not what can be called small. Ideally, the database I'm looking for will be embedded in a J2ME application.

Is there something like this?

+6
source share
4 answers

You can try http://www.jepstone.net/tinySQL/ .

Pros:

  • He is small (93k!)
  • Built in
  • It uses DBF files or text files to store data, so it is easy to read.

Minuses:

  • This is an old project without a project.
  • It is not intended to work in j2me, but since it can work in JDK 1.1.8, it will not be difficult to get it to work in j2me. Of course, you will have to change some code using RandomAccessFile to FileConnection, etc., but at least you don't have to bother with the code related to generics.
  • It is not very fast because it does not use indexes, so you need to try and see if it is suitable for yuor needs.
  • This is not a complete feature set, it just gives you a small subset of SQL
+2
source

Take a look at HSQLDB or H2DB

or possibly a keyword based database like jdbm2

+14
source

Yes, there is an Apache project for Apache Derby .

+4
source

Source: https://habr.com/ru/post/890819/


All Articles