|
|
|
|
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.
|
|

03-17-2008, 12:41 PM
|
|
Member
|
|
Join Date: Mar 2008
Posts: 1
|
|
|
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.
|
|

03-17-2008, 12:58 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
|
|
|
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.
|
|

03-17-2008, 08:39 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 13
|
|
|
What database software would you recommend is SQL a good choice? Does it work with java?
|
|

03-19-2008, 11:03 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
|
|
|
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.
|
|

07-13-2008, 09:55 AM
|
|
Member
|
|
Join Date: Jul 2008
Posts: 2
|
|
|
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
|
|

07-13-2008, 06:41 PM
|
|
Member
|
|
Join Date: Jul 2008
Posts: 32
|
|
|
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.
|
|

07-14-2008, 08:11 AM
|
|
Member
|
|
Join Date: Jul 2008
Posts: 2
|
|
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);
|
|

07-14-2008, 03:41 PM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 44
|
|
|
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.
|
|

07-15-2008, 04:14 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,065
|
|
|
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.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
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