Evaluating local storage for data persistence for small, stand-alone applications

TL;DR –

I have a standalone application that will remain relatively small. I’m trying to evaluate between using XML files or a lightweight database for local storage of data that needs to be persisted. What factors should I consider when choosing between the two approaches?


Let’s assume that I have a program that will have the following functionality and requirements:

  1. A user will be given a drop-down list of all of the available items in the program, each representing a different type of an object (i.e., different cars, technical components, animals, etc.) which will be populated when the program loads from the available selection, thus it is dynamic in that it reflects the available data with nothing hard-coded. If someone adds/removes the files/entries for an object, it will no longer be accessible in the program and will vanish from the drop-down list when it is reloaded.
  2. It will be possible for a user to add a new object (with an interface of textboxes and other such modifiable elements) to the collection of data and make use of it. Data must also be easily shared by adding the new objects to another individual’s collection afterwards:
    • One thought would be simply dragging+dropping files into a folder or handling the file moving on the interface
    • Another would be having the interface allow the option to merge entries in a shared database file to the user’s file

I was considering the C# local database files for this, which I have not been able to get a strong understanding of in my research. I am assuming what I am thinking about them is true but I am not confident in this. This is not a client-server application in any way and will run locally on (hypothetically) any modern Windows installation.

The program is, in short, a creature generator for an RPG, meant to give the user an easier time doing the calculations and designs for whatever they want to do by taking most of it out of their hands. Ideally this will be a quick “install this, and you’re done” sort of application, with little to nothing else that needs to be done or installed besides. There are approximately 80 fields for each object, and about 150 lines of XML (I have a template file but no work done on the parser), but many are simple strings or key-value pairs that will not change when the objects are loaded. The XML files or database rows could easily expand, as certain things such as the list of skills could expand drastically for some creatures (i.e. some creatures may have one column/field for a certain section, another may have 10). I am expecting there to be in the range of 300-600 possible choices, but as above, the number is dynamic and could increase beyond that. I do not expect it to go above 1000.

I am aware that pure text files may be another option, but the nature of my program could make them a bit messy to read/parse, perhaps, but they are not a complete impossibility if neither of these two are valid options.

Would the simplicity of using the XML, since they are single files and thus easier to share, outweigh the potential efficiency of the database option?

My assumptions on the matter lead me to believe the following:

  • If the local databases work the way I expect them to, and are as simple as I’m hoping, there will be no doubt in my mind that it will be the easier approach, except for the fact that it may be difficult to share only ONE object’s data. There are other portions of the code which may also benefit greatly from the use of these tables as well; if they are what I think they are, things will become much easier for myself and most likely the user.
  • From previous experience parsing XML with C#, it should be rather simple, but maybe not as reliable or efficient, to perform the specified operations with XML files.

Thanks!

6

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Evaluating local storage for data persistence for small, stand-alone applications

TL;DR –

I have a standalone application that will remain relatively small. I’m trying to evaluate between using XML files or a lightweight database for local storage of data that needs to be persisted. What factors should I consider when choosing between the two approaches?


Let’s assume that I have a program that will have the following functionality and requirements:

  1. A user will be given a drop-down list of all of the available items in the program, each representing a different type of an object (i.e., different cars, technical components, animals, etc.) which will be populated when the program loads from the available selection, thus it is dynamic in that it reflects the available data with nothing hard-coded. If someone adds/removes the files/entries for an object, it will no longer be accessible in the program and will vanish from the drop-down list when it is reloaded.
  2. It will be possible for a user to add a new object (with an interface of textboxes and other such modifiable elements) to the collection of data and make use of it. Data must also be easily shared by adding the new objects to another individual’s collection afterwards:
    • One thought would be simply dragging+dropping files into a folder or handling the file moving on the interface
    • Another would be having the interface allow the option to merge entries in a shared database file to the user’s file

I was considering the C# local database files for this, which I have not been able to get a strong understanding of in my research. I am assuming what I am thinking about them is true but I am not confident in this. This is not a client-server application in any way and will run locally on (hypothetically) any modern Windows installation.

The program is, in short, a creature generator for an RPG, meant to give the user an easier time doing the calculations and designs for whatever they want to do by taking most of it out of their hands. Ideally this will be a quick “install this, and you’re done” sort of application, with little to nothing else that needs to be done or installed besides. There are approximately 80 fields for each object, and about 150 lines of XML (I have a template file but no work done on the parser), but many are simple strings or key-value pairs that will not change when the objects are loaded. The XML files or database rows could easily expand, as certain things such as the list of skills could expand drastically for some creatures (i.e. some creatures may have one column/field for a certain section, another may have 10). I am expecting there to be in the range of 300-600 possible choices, but as above, the number is dynamic and could increase beyond that. I do not expect it to go above 1000.

I am aware that pure text files may be another option, but the nature of my program could make them a bit messy to read/parse, perhaps, but they are not a complete impossibility if neither of these two are valid options.

Would the simplicity of using the XML, since they are single files and thus easier to share, outweigh the potential efficiency of the database option?

My assumptions on the matter lead me to believe the following:

  • If the local databases work the way I expect them to, and are as simple as I’m hoping, there will be no doubt in my mind that it will be the easier approach, except for the fact that it may be difficult to share only ONE object’s data. There are other portions of the code which may also benefit greatly from the use of these tables as well; if they are what I think they are, things will become much easier for myself and most likely the user.
  • From previous experience parsing XML with C#, it should be rather simple, but maybe not as reliable or efficient, to perform the specified operations with XML files.

Thanks!

6

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật