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