Reputation: 939
I'm creating a java desktop application using swing which requires some database persistance for which I'm planning to use Hibernate. I'm pretty new to desktop application development so I wanted to know if and how the database can be created on the client computer when installed.
Is there a script to be run or maybe a hibernate configuration which initiates database creation?
A sample tutorial or example illustrating this will be ideal (although I was not able to find one).
Thanks in advance for any help provided.
Upvotes: 1
Views: 5672
Reputation: 302
Hibernate is Framework used as middle layer in project which interact between database and Business layer logic. Hibernate features
So my suggestion is to go with MySQL because
Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows.
A very fast thread-based memory allocation system.
Very fast joins using an optimized one-sweep multi-join.
The server can provide error messages to clients in many languages.
This is only few features but you go to official site for more detail. And most important it's open source.
And the post help to install and configure on client system.
Upvotes: 0
Reputation: 10240
I think it would be better if you can start with javaDB or SQLite. They are perferred embedded database technologies for desktop java applications. You can download the jar for sqlite-jdbc from here.
Take a look at few tutorials on JDBC
If you making swing applications, make sure you learn to use swing worker well. It will be important to perform background processing.
Upvotes: 0
Reputation: 383
Hibernate is not an database server itself, it is a object-relational mapping framework so you need a either embedded or stanalone database server. Java DB that comes with the JDK will be sufficent for desktop applications.
Upvotes: 2
Reputation: 5002
http://hamidseta.blogspot.in/2008/05/install-mysql-server-50-silently.html
In your package installer scripts perform the steps of silent MySql installation. In the BAT file put the code you find in the above link before triggering your Java application installer.
As per free licensing terms, one should not package MySql bundle for free, just check about the licensing if you bother.
Upvotes: 0