Results 1 to 2 of 2
  1. #1
    PrinceSendai is offline Member
    Join Date
    Jul 2010
    Lima, Peru
    Rep Power

    Default Newbie design question

    I was working on creating a diary program. I need to store the diary entries in some file or set of files. Also, I want my program to be portable and to be as simple as possible. So far I have been working on using an SQLite database for this task, each row being a diary entry, and containing the date created, the entry itself, optionally a title, and optionally some keywords.

    Now, if you were creating a diary program, what approach would you use to store these data?

    An option I had considered would be to write all the entries in a plain text file, and to write my own encryption algorithm, while keeping track of the separation of the entries within the text file.

    Do you think using a database is the best solution? Or an encrypted text file? Or XML (haven't used this much)? If you think a database is the best solution, what database would be the most portable and the most simple in your opinion?

    I basically just want to see what approach is the BEST to store the diary entries.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power


    To keep record more data, in sophisticated way database is the solution. Then the management of the data also too handy.

    Normally XML formats are used to transfer data, not to record them and keep for future reference. There is no restriction, if you want still you can use to store data, but I'm not recommended it.

    Data encryption depends on how your data should secure to the outside world. Think that you are transferring data through a web service, if it's not secure enough other people can be tampered your data, and so on.

    When comes to the design you want to use, generally you must have an ID, then the title and the content. Other than that, all comments and stuff also. Actually it's depends on what you really want to record.

Similar Threads

  1. Design question: where to put sql
    By Armadillo in forum JDBC
    Replies: 3
    Last Post: 07-30-2010, 06:53 PM
  2. Design question
    By mac in forum New To Java
    Replies: 2
    Last Post: 05-26-2010, 03:48 PM
  3. newbie question
    By ronguilmet in forum New To Java
    Replies: 2
    Last Post: 11-16-2009, 03:37 AM
  4. question on j2ee design pattern
    By Minu in forum Advanced Java
    Replies: 1
    Last Post: 01-06-2009, 08:50 PM
  5. Design question
    By kfunk in forum New To Java
    Replies: 4
    Last Post: 10-10-2008, 04:33 AM

Tags for this Thread

Posting Permissions

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