5

Is it possible to have a embedded database in a small web application? What I need is there should not be any need to install any database in the server machine. By just adding a jar in the folder the database should work.

I am using Java EE, and Netbeans as my IDE. If its possible, what are the open source databases that can be embedded.

Any pointers to some good tutorials will be more helpfull.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
rgksugan
  • 3,521
  • 12
  • 45
  • 53
  • possible duplicate of [What will be the best embedded database to be used with a small Java desktop application?](http://stackoverflow.com/questions/4084390/what-will-be-the-best-embedded-database-to-be-used-with-a-small-java-desktop-appl) – Pascal Thivent Nov 12 '10 at 19:01
  • You've already asked the exact same question (which is actually a dupe of many similar questions). What makes you think things are different with a webapp? The JVM of a container is not that different from the JVM of a desktop app. – Pascal Thivent Nov 12 '10 at 19:02

3 Answers3

6

SQLite is the big one. MySQL has an embedded server, but you need to purchase a commercial license for it. Firebird also has an embedded server which it's free.

Quethzel Diaz
  • 621
  • 1
  • 11
  • 26
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
6

HSQLDB, a popular embedded database, is just one jar file that you can drop in your application.

darioo
  • 46,442
  • 10
  • 75
  • 103
3

I haven't tried that but thinking about it, I think you can. I have worked with HSQLDB before and all I had to do was to run the embedded db and then run my client. You can do this by creating a cmd script in Windows or .sh script in Linux.

Some embedded databases:

H2

HSQLDB

Java DB

Jeune
  • 3,498
  • 5
  • 43
  • 54