简体   繁体   中英

Desktop application in java with database

I am trying to implement an application for a friend who sells t-shirts and hats, so we are dealing with interconnected tables. I was wondering what would be the perfect libraries to achieve this goal. What kind of database should I use to make it portable and easy to deploy. I would really like to insist on the database stuff, what should I use?

Thank you so much (I use Netbeans)

It seems like it needs to go production. Better go for H2 , its a better, faster HSQLDB.

Check out Hypersonic and Derby . They are embedded databases that store their data in a simple file so you don't have to worry about installing and managing a complex system like mysql or postgres or sql server. They work with the regular jdbc front end.

Here is a Java binding for SQLite. SQLite is very lightweight and should suit your needs very well.

A nice database editor is also a godsend. I recommend SQLite Manager , a Firefox plugin, when working with SQLite.

For the engine, look into embedded databases like sqllite, derby and hsqldb

For the integration you can either keep it simple and use plain old JDBC which will make things easier to an extent or go the Hibernate or JPA way

We used HSQLDB initially for a similar application . But after going to production with it some of the users experienced random data corruption ( look though their forum, it seems like a common issue ), So we switched to Derby which proved to be stable . So my vote is Derby .

Also, I would stay away from hibernate for desktop applications due to huge startup time (it has to prepare the metadata upfront ), unless you only have few tables / models.

I would use Hibernate (or JPA) in order to create a standard mapping between the relational database and the object oriented java design.

As far as databases are concerned I often use MySql or Oracle XE which are free and robust enough for your purposes.

你也可以使用SQLite

You can use Firebird with JayBird

Firebird is free, very easy to install and setup with good backup

Another option is Perst, an open source, object-oriented database that is 100% Java.

For info on Perst, see www.mcobject.com/perst.

You can download Perst, with source code, at www.mcobject.com/perst_eval.

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