Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-17-2008, 12:41 PM
Member
 
Join Date: Mar 2008
Posts: 1
easyRyder is on a distinguished road
Saving data...?
I wish to save an id and some numerical data, for some items, permanently. There will eventually be a large number of items and i wish to perform searches on this data. Can anyone advise me on the best (preferably simplest) way to store this data.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-17-2008, 12:58 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Use a database. It is the best option you have to deal with large amount of data.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 03-17-2008, 08:39 PM
Member
 
Join Date: Nov 2007
Posts: 13
shaungoater is on a distinguished road
What database software would you recommend is SQL a good choice? Does it work with java?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 03-19-2008, 11:03 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes it's a good choice, and work fine with Java.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-13-2008, 09:55 AM
lup lup is offline
Member
 
Join Date: Jul 2008
Posts: 2
lup is on a distinguished road
use joafip library to save object in file
To avoid database administration you can use joafip.
This made you able to save your entire data model in file and to access to any entity without loading all in memory. This make able to manage more object that memory can contains
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-13-2008, 06:41 PM
Member
 
Join Date: Jul 2008
Posts: 32
Engineeringserver.com is on a distinguished road
or you could use a map and save the object if you don't know how to connect and use a mysql db using the jconnector
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

<--
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Java developer
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-14-2008, 08:11 AM
lup lup is offline
Member
 
Join Date: Jul 2008
Posts: 2
lup is on a distinguished road
Save and reload a map using serialization works fine, but the amount of memory is a limitation. Using joafip it is no more the case.
In following example the map is nether enterely loaded in memory.

adding value in the map
session.open();
map=(PTreeMap)session.getObject("myMap");
map.put(key,value);
session.closeAndWait(EnumFilePersistenceCloseActio n.SAVE);
getting value from the map
session.open();
map=(PTreeMap)session.getObject("myMap");
value=map.get(key);
session.closeAndWait(EnumFilePersistenceCloseActio n.SAVE);
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 07-14-2008, 03:41 PM
smartsubroto's Avatar
Member
 
Join Date: May 2008
Location: India,Kolkatta
Posts: 44
smartsubroto is on a distinguished road
Send a message via Yahoo to smartsubroto
the best way is to keep your data in Database say SQL using JDBC-ODBC driver
or you can save your data to a .dat or .csv file. using java.io.*;

try this out..
__________________
Thanks & Regards
Subroto Bhattacharjee
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 07-15-2008, 04:14 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
More that the driver use in an application, DB use make more effect on the application. I mean Oracle, SQL and so on.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving objects to file JavaForums Java Blogs 3 02-02-2008 06:48 PM
Saving data in an XML file Thez New To Java 1 12-08-2007 10:24 PM
Saving application settings mwildam New To Java 0 11-16-2007 03:30 PM
Saving Blob through Hibernate Ed Database 1 07-09-2007 05:24 AM
Saving Variables Fish New To Java 6 06-25-2007 09:20 PM


All times are GMT +3. The time now is 06:49 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org