• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Advice on database application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 322
24
Eclipse IDE Firefox Browser
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic