The moose likes JDBC and Relational Databases and the fly likes Which Database to Use ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Which Database to Use ?" Watch "Which Database to Use ?" New topic

Which Database to Use ?

Abdullah Arslan

Joined: Apr 24, 2005
Posts: 13

I need a database for a project. I used mysql before but i want another
database which doesnt require server setup.

Can you recommend a database that can be used like ms access( i mean just a datafile and a driver ) ?

Thanks for answers....
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

We're not really a fan of Access 'round these parts, we like to say you can use a database or you can use Access

Seriously though, I think it's better to use a DB and try to avoid Access. If you're looking for something light, have a look at HSQLDB (on sourceforge). It can be run several ways, but in general you do not need to maintain a server.
Masoud Kalali
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

In addition to HSQL i suggest you check Derby
which is open source and could be used in embeded mode
there are several documentation about embeding it into application servers , and some very good samples too.

checkout :
you can get a good database manager from IBM , or use Netbeans which has derby module integrated into IDE.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

Going back to the original requirement, what do you mean by "doesn't require server setup" ?

Does this refer to a datasource? If so, you can use DriverManager to just get a connection without involving a datasource.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You can also look into MYSQL.

So much trouble in the world -- Bob Marley
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

I think you should consider money and power before deciding on your database. Some databases are definitely more expensive then others whereas some allow a lot more power, especially in distributed computing.

For example, Oracle is usually more expensive than SQL Server, but often more powerful (although I haven't checked pricing and new features lately so this could be out of date). Then again, if you aren't in a situation where you don't need the power, then you're throwing your money away where you don't need to.

Chances are if you don't know what you want to use, go with MySQL for now since it will save you a lot of money. IBM's Cloudscape database recently became an open source project, although I don't know too many people using it other than to manage WebSphere queues, so it probably has its own pluses/minuses.
[ November 27, 2005: Message edited by: Scott Selikoff ]

[OCA 8 Book] [Blog]
Dale Smirth

Joined: May 17, 2005
Posts: 14
You could try filemaker pro.
Abdullah Arslan

Joined: Apr 24, 2005
Posts: 13
Thank you for all answers,

I am sorry i could not explain the issue properly,
I think the corrcect phrase was "embedded database".
I knew some about oracle, and quite about mysql. However to use them in my application i must to setup server in addition to my application's setup.

I wanted to create just one setup, put required datafiles to program's folder and using the correct driver, handle all of the database works of the application.

I understand from answers that hsql and derby fulfils my need ( can work as embeded ).

However i am not so sure, if i am wrong please correct me.

Again thanks very much for all answers...
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

I can't answer for Derby, but HSQLDB can be embedded in your application so that it does not require separate installation.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

MySQL can also be embedded in your app, but probably HSQLDB would be much easier to use. HSQLDB is written in pure Java, so you can be sure it works on any platform that Java runs on.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Abdullah Arslan

Joined: Apr 24, 2005
Posts: 13
I am grateful for your answers.

i liked hsqldb.

I agree. Here's the link:
subject: Which Database to Use ?
It's not a secret anymore!