• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to store data without database  RSS feed

 
sasikanth dronavalli
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i want to create a simple java stand alone/desktop application like todo list. i want to store the data entered by the user(memo). is there any possibility to store data anywhere without using the database.

can we use database to the desktop applications and how? if we use any database , is there any necessity to have the same database software in the clients systems(where we install this application)???

i'm new to java please help me!!!

thanks in advance
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sasikanth dronavalli wrote:hi i want to create a simple java stand alone/desktop application like todo list. i want to store the data entered by the user(memo). is there any possibility to store data anywhere without using the database.

Yes, a common alternative is to use the file system, for example XML files. XML tends to be not as easily queried though, so things like 'give me all todos with due dates in the next five days' would be harder to implement than if you used a database.

sasikanth dronavalli wrote:can we use database to the desktop applications and how?

Yes. The same way you would use it in the server, or other application. See the JDBC tutorial: http://docs.oracle.com/javase/tutorial/jdbc/basics/

if we use any database , is there any necessity to have the same database software in the clients systems(where we install this application)???

There are three ways to go about it.
1) Let the user choose their own DB, and provide a configuration file to tell your application how to connect to it.
2) Require a specific DB, ship it with your application and require the customer to install and maintain it. You may also need a configuration file to tell your app how to connect to it. The DB installer could be triggered from your applications installer so it looks like one single installation processes.
3) Provide an embedded DB as part of your installation package and use that.

From the user perspective, #3 is the simplest to install and maintain (if could be invisible to the user that a database is being used). To do that, you need to use a small, embedded database. Fortunately, the JDK comes with JavaDB, which fits the bill nicely. There are other alternatives, like SQLite and HyperSQL.
 
sasikanth dronavalli
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Luke wrote:
sasikanth dronavalli wrote:hi i want to create a simple java stand alone/desktop application like todo list. i want to store the data entered by the user(memo). is there any possibility to store data anywhere without using the database.

Yes, a common alternative is to use the file system, for example XML files. XML tends to be not as easily queried though, so things like 'give me all todos with due dates in the next five days' would be harder to implement than if you used a database.

sasikanth dronavalli wrote:can we use database to the desktop applications and how?

Yes. The same way you would use it in the server, or other application. See the JDBC tutorial: http://docs.oracle.com/javase/tutorial/jdbc/basics/

if we use any database , is there any necessity to have the same database software in the clients systems(where we install this application)???

There are three ways to go about it.
1) Let the user choose their own DB, and provide a configuration file to tell your application how to connect to it.
2) Require a specific DB, ship it with your application and require the customer to install and maintain it. You may also need a configuration file to tell your app how to connect to it. The DB installer could be triggered from your applications installer so it looks like one single installation processes.
3) Provide an embedded DB as part of your installation package and use that.

From the user perspective, #3 is the simplest to install and maintain (if could be invisible to the user that a database is being used). To do that, you need to use a small, embedded database. Fortunately, the JDK comes with JavaDB, which fits the bill nicely. There are other alternatives, like SQLite and HyperSQL.


Can you elaborate the third point please i don't know about the javaDB.........please???
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sasikanth dronavalli wrote:
Can you elaborate the third point please i don't know about the javaDB.........please???


Oracle Java DB
http://www.oracle.com/technetwork/java/javadb/overview/index.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!