Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advice on database application

 
Ronald Guilmet
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning Java, and I am looking to have a stand alone application with a database to store some simple information. I installed Netbeans and I am using Oracle JDK 8. Will JavaDB work as an embedded db?
just to be clear and embeded db means I don't have to connect to a server like postgresql or mysql right?
Is Javadb another name for apache derby or vice versa?
 
Chris Barrett
Bartender
Posts: 317
24
Eclipse IDE Firefox Browser
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronald,

Welcome to the Ranch!

Java DB is included in the JDK from Java 6 onwards. It's an embedded database, meaning if you compile your program for distribution to a user, the database will be included. It works great for small, standalone type apps. PostgreSQL or MySQL are not required to use Java DB. PostgreSQL or MySQL would require more complex configuration setups, so if your goal is to learn Java not databases, I would stick with Java DB for the time being. Once you are comfortable with how Java works with databases, then look at learning to configure a PostgreSQL or MySQL database for connection to Java.

I wouldn't say Java DB is another name for Apache Derby, though, technically. The Java DB product includes Derby without any modification whatsoever to the underlying source code, but I believe Oracle has added wrapper code to help simplify the configuration with Java. From a usability perspective, Java DB and Derby have the same functionality and therefore the Java DB documentation often refers to the core functionality as Derby.
 
Ronald Guilmet
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help. I volunteer with a pet food pantry, and I would like to make it easier to track food that is donated to us, and food that is given out.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronald Guilmet,

First of all, a warm welcome to CodeRanch!

Ronald Guilmet wrote:Will JavaDB work as an embedded db?

Definitely! But there are several other Java SQL database which can be used as an embedded database. For example: H2 and HSQLDB (HyperSQL DataBase). And here you'll find a performance comparison between the embedded databases H2, HSQLDB, and Derby.

Hope it helps!
Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic