views:

333

answers:

5

I am creating a small application that will be deployed on Window. The database will have less than 10 tables.

Instead of installing a database on the client box is using XML documents for the database and LINQ going to cost in performance of queries, waiting for the XML file to be loaded and be written?

If I use a database I will use LINQ to SQL.

+7  A: 

I would avoid it. I personally would use something like SqlExpress for the DB, or an .mdb file. The problem becomes when that Xml file starts getting large, or requires a change to the format (i.e. an update to a table's structure), processing that becomes a PITA.

MagicKat
+2  A: 

You can use an embedded database like SQLite or the portable version of SQL server (can't remember what it's called), that way you can still use SQL and LINQ but you don't need to install a database server

Nir
That would be SQL Server Compact Edition.
Lucas
A: 

I would prefer that if you choose the database route. One of the main reasons is that you can perform many different functions easily when using database. These functions include sorting, paging, grouping etc. You can also use the power of OR mappers to simply your coding and achieve the persistence, retrieval operations with very few lines of code.

The bottom line is go with the database!

azamsharp
A: 

Adding some references to MagicKat's answer:

Not very portable, but free and limited -

SQL Server 2008 Express

Microsoft JET is a better fit to Nir's compact requierment. It is embedded (installed as a DLL), and you can move the DB as a single file (.mdb). From the Wikipedia article, I learn that the current version is Microsoft Access Engine.

gimel
A: 

See also this question for a lot of related answers.

Simple database application for Windows

Sklivvz