如何将数据存储在.NET [英] Ways to store data in .NET

查看:154
本文介绍了如何将数据存储在.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找的方式来存储数据,在Windows .NET中的窗体应用程序。
我希望做一个系统的输入数据持久的,所以当我关闭我的程序,然后再次打开它,检索数据。

I am looking for ways to store data in a Windows Forms application in .NET. I want to make the input data of a system persistent, so when I close my program and open it again, the data is retrieved.

哪些方法除了做创建链接数据库,这个存在吗?
例子欣然赞赏。

Which ways of doing this exist besides creating a linked database? Examples are gladly appreciated.

推荐答案

有几十种不同的方式来存储数据。这完全取决于的什么的数据。它是:

There are dozens of different ways to store data. It completely depends on what data. Is it:


  • 只是一对夫妇的配置值?使用内置的设置库。

  • 整机全配置?使用注册表。

  • 交易?使用关系数据库。

  • 相关,但不是事务性的?使用轻量级数据库SQLite的一样SQLCE或

  • 结构,但没有关系?使用XML或JSON文件。

  • 有点结构化和高音量?使用的NoSQL解决方案,像MongoDB的。

  • Just a couple of configuration values? Use the built-in Settings library.
  • Machine-wide configuration? Use the registry.
  • Transactional? Use a relational database.
  • Related but not transactional? Use a lightweight database like SQLite or SQLCE.
  • Structured but not related? Use XML or JSON files.
  • Somewhat structured and high in volume? Use a NoSQL solution like MongoDB.

等等......还有每一个存储要求,很多项目不同的解决方案利用多于一次。

And so on... there are different solutions for every storage requirement and many projects make use of more than one at a time.

这篇关于如何将数据存储在.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆