Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local Data Storage options for .Net based Desktop apps

Tags:

.net

database

As a part of learning .Net and C# (i am of php and mysql background) i am trying to develop a Desktop app that manages bookmark links. It will allow user to add, remove, edit and view the records (saved links). Other options are importing bookmarks from Diigo.com and Dzone.com . Now the problem is where am I going to store these bookmarks, the local ones ? (Not the diigo and dzone ones as by now). Can i use MS SQL server? if so, how i am going to connect it to a Desktop app. And the most important thing, stored bookmarks must be safe in case of windows crash etc.. I mean not like Internet Explorer or firefox where a windows re-install means loss of all links. any help or link would be greatly appreciated!

like image 293
Yaseen Avatar asked Dec 23 '11 14:12

Yaseen


3 Answers

Some good local database options:

Sql Compact Edition

http://www.microsoft.com/download/en/details.aspx?id=7400

http://www.mikeborozdin.com/post/Introducing-Microsoft-SQL-Server-Compact-Edition-(Part-I).aspx

Sqlite

http://sqlite.phxsoftware.com/

http://sqlite.phxsoftware.com/forums/t/76.aspx

SQL Express

Use ADO.net and use the SqlConnectionStringBuilder class to connect to machineName\SQLExpress. You can also download sql

Make sure to download with management studio express as well: http://www.microsoft.com/download/en/details.aspx?id=23650

Tradeoffs

Sql compact and sql express are free downloads and are redistributable. Sqlite and sql compact can be distributed by just copying files - sql express has an installation on the users desktop but is more powerful. For a simple desktop app with simple storage needs and you want the database route, I would lean toward no installation and binary copies via sql compact or sqlite.

like image 123
bryanmac Avatar answered Sep 23 '22 11:09

bryanmac


I recommend you look at isolated storage.

like image 29
Myles McDonnell Avatar answered Sep 21 '22 11:09

Myles McDonnell


If you are looking for a database that is actually in-process i.e. not a process of its own and can be copy deployed and runs on medium trust (wich means it must be written in .NET as well) than you have two (commercial) options besides SQL Server Compact:

TurboDB for .NET

VistaDB

like image 31
Kit Fisto Avatar answered Sep 21 '22 11:09

Kit Fisto