Results 1 to 9 of 9

Thread: Saving data...?

  1. #1
    easyRyder is offline Member
    Join Date
    Mar 2008
    Posts
    1
    Rep Power
    0

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

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    shaungoater is offline Member
    Join Date
    Nov 2007
    Posts
    13
    Rep Power
    0

    Default

    What database software would you recommend is SQL a good choice? Does it work with java?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  5. #5
    lup
    lup is offline Member
    Join Date
    Jul 2008
    Posts
    2
    Rep Power
    0

    Default 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

  6. #6
    Join Date
    Jul 2008
    Posts
    33
    Rep Power
    0

    Default

    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
    :DMy community with sourcode and examples :D
    Java remote image server/client working proof of concept: uitstekendeaccu.nl/tmp/

  7. #7
    lup
    lup is offline Member
    Join Date
    Jul 2008
    Posts
    2
    Rep Power
    0

    Default

    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);

  8. #8
    Join Date
    May 2008
    Location
    India,Kolkatta
    Posts
    50
    Rep Power
    0

    Default

    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:)

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Saving Blob through Hibernate
    By Ed in forum JDBC
    Replies: 2
    Last Post: 01-05-2009, 05:03 AM
  2. Saving data in an XML file
    By Thez in forum New To Java
    Replies: 1
    Last Post: 12-08-2007, 09:24 PM
  3. Saving application settings
    By mwildam in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 02:30 PM
  4. Saving Variables
    By Fish in forum New To Java
    Replies: 6
    Last Post: 06-25-2007, 08:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •