3

I want to build an application that needs a sql database on every machine that uses the application.

Isn't it true that Chrome and Firefox store cookies in a SQL database? I did not remember installing anything like a SQL server while installing Chrome, so my question is: does every user has to install a SQL Server if my app uses one?

  • 5
    Sql database != SQL Server! There are many SQL databases - Microsoft SQL Server is just one. – Tim Rogers Jun 16 '15 at 14:51
  • possible duplicate of [Lightweight SQL database which doesn't require installation](http://stackoverflow.com/questions/271319/lightweight-sql-database-which-doesnt-require-installation) – thomasb Jun 16 '15 at 14:53
  • Still, see http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx and https://msdn.microsoft.com/en-us/library/hh510202.aspx. – John Saunders Jun 16 '15 at 14:56

3 Answers3

6

The best thing for your purpose is to use database servers, which will be started with your application, like SQLite or Sql Server Compact. That means, you application host the database it self and you have access over ADO.Net. This is a very smart kind of storing local data and very easy.

Do not try to install complex database systems like mssql, sybase or mysql on every client.

For example, SQLite can be delivered with a few assemblies in your product.

This answers gives a nice overview: Lightweight SQL database which doesn't require installation

Community
  • 1
  • 1
BendEg
  • 20,098
  • 17
  • 57
  • 131
5

In order to store information for a client application, you can use SQL Server Compact, or some other solution, like SQLite (with a library to access it).

There are other alternatives, but these two are the most common and stable.

thomasb
  • 5,816
  • 10
  • 57
  • 92
2

It's true that Firefox stores cookies in a sqlite database. However, that's not the same thing as SQL Server.

If your app needs to communicate with a database, you can a) bundle a sqlite database with it, b) require an existing database on startup (Wordpress does this; you can pass it details for a mysql database to get it to use an existing installation), or c) bundle a full database (like SQL Server Compact) with your application.

Brian
  • 3,850
  • 3
  • 21
  • 37