Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding MySQL Database into application in C#

I am currently looking into developing an application in C#. The application will need to use a database backend but I was wondering if it possible to embed a database into the application itself. I.e. the user would not need to install MSSQL or MySQL onto the computers separately to my own app but instead install my program and the database is installed with it. If possible I would like to use something like a MySQL Database but not needing the user to install the MySQL Server. Is there a free option to resolve this problem.

Thanks for your help

like image 769
Boardy Avatar asked Nov 28 '25 08:11

Boardy


2 Answers

Look at System.Data.SQLite which can be embedded into your program.

System.Data.SQLite is the original SQLite database engine and a complete ADO.NET 2.0/3.5 provider all rolled into a single mixed mode assembly. It is a complete drop-in replacement for the original sqlite3.dll (you can even rename it to sqlite3.dll if you're using it natively).

like image 86
Steve Avatar answered Nov 30 '25 20:11

Steve


There is also SQL Server Compact which is more similar to Microsoft SQL Server. It also has other threading advantages if you don't use it on network storage.

like image 40
Craig Suchanec Avatar answered Nov 30 '25 22:11

Craig Suchanec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!