开发者

WPF Application with Database

开发者 https://www.devze.com 2022-12-29 22:22 出处:网络
i would like to or need to use a database for my wpf project. It has to store \"person\" \"team\" \"goals\" and maybe 2 more things, nothing 开发者_StackOverflow中文版very big. Ive already used (worke

i would like to or need to use a database for my wpf project. It has to store "person" "team" "goals" and maybe 2 more things, nothing 开发者_StackOverflow中文版very big. Ive already used (worked) with databases in java / php (postgresql), but is there maybe an "easier" way to store the things.. i mean if the db is going to be big than i could use (postgre or mysql), but this one would be small.


You could use XML or binary serialization, but if your items are related to each other, then a relational database (like some flavour of SQL) would likely be easiest to manage.

If you don't want the overhead of running and supporting a database server, take a look at System.Data.SQLite.


Well there are lots of options for storing your application data. Your choice will depend on things like whether multiple users need to access the same data store, whether you want to use stored procedures and SQL, what kind of security you need. I think the two most obvious options are:

  1. Serialize your objects to XML or binary. Have a look at Karl Shifflet's "Stuff" application video tutorials which includes one showing how to make a local data store
  2. Use a light-weight database like VistaDB or SQL Server Compact edition
0

精彩评论

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

关注公众号