开发者

what is recommended for a wpf app, sql database or xml

开发者 https://www.devze.com 2023-04-10 15:01 出处:网络
I want to build a wpf app (with mvvm dp) and I need to manage a list of customers (200 customers maximum)

I want to build a wpf app (with mvvm dp) and I need to manage a list of customers (200 customers maximum) What is the recommended way to handle this? sql (mySql开发者_运维问答, sqlServer) or other way (xml, excel, access)?

I can see advantage in xml because its not required addition installation


If you've got multiple users on different machines, and those machines have a persistent, shared network connection (they're on the same network, for instance), then you should prefer to use a central database, like (as you mention) SQL Server or MySQL. The latter is free, and the former is available in a free edition (Express) for light workloads.

If you don't need to share data between the different users of your application (you don't mind if their customer data get out of sync), then look at lightweight, embedded databases, like SQLite or SQL Server Compact Edition. Very simple and easy to set up and maintain, but the data stays present on a single machine.

You could build an infrastructure around manual synchronization between the different machines, sort of like how iTunes synchronizes data between your computer and iPhone whenever you plug the latter in, but trust me, that's a lot of work that's best avoided if possible. Databases have a lot of built-in multiple-users-doing-stuff-at-the-same-time logic that you want to leverage if at all possible.


If the only thing you need to persist is a list of 200the items and you don't see there as being any other persistent data requirements in the future, I would say that a flat file is plenty. However, this also depends on how often that small data will be retrieved.

I am a huge proponent of SQL Server, and Express is free. But you don't want to overengineer the problem. Unless I misunderstood your question, that is my evaluation.

0

精彩评论

暂无评论...
验证码 换一张
取 消