0

I am trying to make an engineering program using C# language, the program requires input from the user to substitute it in the equations but the equations needs lots of constants and coefficients, for example, a frictional coefficient that varies with temperature, so I have tabulated this data in an SQL database table.

So my question: is it possible to make this table included within the application so that the program can be easily published and used so that users do not need to install SQL or any database program.

If using a database is not the right call to create such application how to do this ?

Taher
  • 565
  • 1
  • 14
  • 32
  • 1
    Take a look at [Sqlite](http://www.sqlite.org/) – OldProgrammer Oct 14 '14 at 16:50
  • 3
    You may consider using an XML file, which you initialize and load your data into when it doesn't exist on the users machine. – ron tornambe Oct 14 '14 at 16:52
  • 1
    Or SQL Compact http://msdn.microsoft.com/en-gb/data/ff687142.aspx – Maarten Oct 14 '14 at 16:53
  • You're looking for an embedded database. Which one is best for you will depend on what OS you are developing for, how much data you have to store, whether users will be changing it, whether you need database procedures, and many other things you haven't told us. – Dour High Arch Oct 14 '14 at 17:01
  • @DourHighArch OS is Windows, the data will not exceed 100 MB and it is all numerical (ex: 0.01548) – Taher Oct 14 '14 at 17:15

2 Answers2

2

You can use SQL Server Compact for file based databases up to 4GB.

Martin Volek
  • 1,079
  • 3
  • 12
  • 27
0

I believe what you're looking for is Visual Studio's SQL Server Project:

http://msdn.microsoft.com/en-us/library/84b1se47%28v=vs.90%29.aspx

To use it for your scenario, you would script out the database WITH data:

Generate script in SQL Server Management Studio

It probably won't load in < 5 seconds, but you can also set the db project to just be there & not load every time the project is loaded, then a dev can just re-enable the db project, publish it & disable it again.

Community
  • 1
  • 1
RandomUs1r
  • 4,010
  • 1
  • 24
  • 44