Best data storage method for small personal application(SQL Database, XML, or other file type)

旧时模样 提交于 2020-01-07 06:22:12

问题


I have done a little research here on SO and haven't found exactly what I was needing. I am currently learning C++ to help transition my companies MSSQL Delphi driven application over to C++. In order to help facilitate my learning I am working on a personal application for my home use. Since I don't really think I will need to power of a database I was looking at other methods to store data. It may help answer my question if you know what the program will do.

What it is: Family Budget, medical and planning application.

What I want to do with it: Instead of keeping budgeting spreadsheets, PDF medical documents and other family oriented data on a thumb drive in an unorganized manner. I want to build a front-end that has multiple tools.

I want to be able to store and access general personal info, full family medical records (including diabetic tracking tools such as daily glucose numbers and insulin delievered), budget information, information on current/historical bill (account #'s, amounts due, paid, due dates, etc) data and really anything else I can think of to make my personal data more organized. I also plan to be able to print reports and make charts and graphs for this data. I may wish to encrypt the data but I am unsure at this time.

Now I know that an actual sql, mysql or progress database would be absolutely fine for this project, however I really wish to use something else that may be smaller and simpler. Would XML be a valid option? Are there other file types out there that I could use to store all the data. I am looking for a small footprint, with quick access and the ability to perform "massaging" on the data.


回答1:


Use SQLite. It gives you much of the power of a DBMS, including a mostly complete implementation of SQL-92 but is completely embedded in your app, and has no installation footprint.

For C++, several libraries are available that wrap an OO API around the fairly RAW C interface. See this SO question for recommendations.

Don't even think about using XML. A database is the perfect place to store the kind of information you are working.




回答2:


SQLite (as Marcelo recommends) or SQL Server CE (if your will use .NET)



来源:https://stackoverflow.com/questions/4963173/best-data-storage-method-for-small-personal-applicationsql-database-xml-or-ot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!