• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Standalone Database

 
Dima Tunik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I'm new here in the forum, I started to learn java by myself (I have some knowledge in C and C++ so I know how to use the basic stuff in java).
I figured the best way to learn is to start crating some small apps by myself.

I want to create an app that holds users passwords and usernames for websites and will fill it automatically for him.

so my first problem is the database, I want the program to save all it data on the user computer and not on a server.
is there any way to create in java a small standalone database?

thanks,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dima,
Welcome to CodeRanch!

You have a few choices:
1) Use a file as a "database". This is very lightweight and good for user machines. It's not so good for learning (as you probably want to learn JDBC which means a more traditional database.)
2) Use an in memory database like Derby
3) Install a standalone database on your machine for testing. The most common ones are MySQL and PostgreSQL'
 
Dima Tunik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jeanne,

Thanks for the answer, I have a few questions:
I read about JAVA derby database that is built in I didn't understand how to use it and didn't find any good guides, do you have any to recommend?
and about installing MySQL on the computer, will it work if another user will use my app but won't have MySQL on his computer?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dima Tunik wrote:
I read about JAVA derby database that is built in I didn't understand how to use it and didn't find any good guides, do you have any to recommend?

Derby comes with a tutorial. Feel free to ask questions here at CodeRanch as you read.

When using Derby, there are two modes:
jdbc:derby:memory:...
jdbc:derby:..

The later persists the database which is what you'll want if you are distributing your application to users.


Dima Tunik wrote:and about installing MySQL on the computer, will it work if another user will use my app but won't have MySQL on his computer?

No. I was thinking your project was just for learning. If you are actually going to distribute it, the user would have to install MySQL to use it.
 
Dima Tunik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the help,
and about the project I'm not going to distribute it I just want it to work like it is a real app.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic