Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service based database vs SQL Server Compact vs LocalDB?

My goal is to create a stand-alone C# Windows form application with 2-3 tables that will be installed on client machine with a installer file. And I don't want to install SQL Server 2008 software on client machine, I'm using Visual Studio 2013 C# for development.

My options are SQL Server Compct 4.0 but I don't see Visual Studio 2013 has inbuilt support for that, when I add new item to project I don't see Compact (.sdf) file option there.

I've installed third-party SQL Server Compact Toolbox so I can create .sdf file and connectivity but I believe Microsoft is not giving support for compact db now.

I can see service-based database (.mdf) file which is actually a LocalDb\\ something.

So what should I use if I don't want to install SQL Server 2008 on client but want to have db at client software?

like image 958
Registered User Avatar asked Feb 22 '14 05:02

Registered User


People also ask

What is Microsoft SQL Server Compact 4.0 used for?

Microsoft SQL Server Compact 4.0 is a free, embedded database that software developers can use for building ASP.NET websites and Windows desktop applications.

What is SQL Server Compact database?

Microsoft SQL Server Compact (EOL, See SQL Express) (SQL CE) is a compact relational database produced by Microsoft for applications that run on mobile devices and desktops. Prior to the introduction of the desktop platform, it was known as SQL Server for Windows CE and SQL Server Mobile Edition.

What is Microsoft SQL Server Compact 3.5 used for?

SQL Server Compact 3.5 SP2 is an embedded database that allows developers to build robust applications for Windows desktops and mobile devices.

What is service based database in Visual Studio?

A service-based database is a database that is only accessed through a server. It uses an MDF data file, which is SQL Server format. To be able to connect to a SQL Server database the SQL Server service must be running, because it's that that processes your requests and access the data file.


2 Answers

You should mostly base your choice on your target platforms and the level of SQL Server functionality you expect.

Target Platforms:

LocalDB does not support older versions of Windows (e.g. Windows XP) or WoW. Toad World's LocalDB overview has a good breakdown of its target-platform restrictions.

SQL Server Compact Edition has very few target-platform restrictions. Check out its download page under "System Requirements" for specifics.

Functionality:

LocalDB better approximates SQL Server Express functionally. SQL Server Compact Edition has many functional limitations (e.g. no support for stored procedures).

MSDN's introductory overview of LocalDB explains many of the important functional differences between LocalDB and SQL Server Compact Edition; and the aforementioned Toad World LocalDB overview explains some of what (not) to expect from LocalDB functionally too.

Redistribution:

Both SQL Server Compact Edition (per the "Additional Information" section of its download page) and LocalDB (per SQL Server forums) are freely redistributable: so you should be okay with either with respect to fine print.

like image 136
J0e3gan Avatar answered Sep 28 '22 03:09

J0e3gan


maybe SQLite would be an option? check out: http://www.sqlite.org/ it's just a DLL/Assembly you need to reference and it's pretty straightforward..

like image 38
Christian Casutt Avatar answered Sep 28 '22 04:09

Christian Casutt