简体   繁体   中英

Java Desktop Application with Embedded Database

i'm planning to start the development of a java desktop application with a database embedded. It will be an application without internet connection and just for that, to insert, update and delete data on the database. It will be a lot of data.

So, i would like to have your opinions, what libraries should i use to incorporate the database in the application to have good performances in the end? Should i use jdbc derby that's already incorporated with neatbeans?

Thanks in advance!

Some popular options are:

  1. HSQLDB
  2. BerkleyDB
  3. Sqlite
  4. Derby

Its impossible to say if they will be "fast enough", since its all relative. What is fast enough? How powerful is the host machine? How big is your dataset? Etc etc.

However, I can say I have seen really good performance from HSQLDB, with fairly large dataset (100K records +) on fairly moderate desktop machines. Sqlite I only explored for android, but its pretty impressive on this platform (considering the hardware it is running on).

I think you should do a little proof of concept, and test them out with some simulated data.

I been using Derby in production for years and it works well. The H2 database also looks good, it's supposed to offer better performance than Derby but I haven't used it in production. Both of these, along with HSQLDB are good choices as they are pure java, all you need to do is bundle the required jar files with your application. Sqlite and Berkely are fine products but not written in Java so I imagine these would be a little more difficult to work with.

You don't need any particular libraries. Each of the above databases should provide a JDBC driver which is the standard way of doing things. You can certainly use an ORM such as Hibernate as mentioned above. This makes some things simpler but if you're just starting out, it might be better to avoid this at first.

If Derby is available, I would use Derby. HSQLDB is another good option. For libraries, I would look at some library for database access. Spring comes to mind. If you have control of the database, I would look at an ORM mapping framework such as Hibernate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM