C # database in file

How to create a db file in C #? a friend told me that he is in the toolbar and does not use sqlite. I do not see anything that could be, and that it is called. Google did not help :(

+6
c # database file
source share
8 answers

There is no file-based database provider built into C # or the .NET Framework. Of course, there are already existing connectors for using SQL Server (which includes SQL Express ), but if you need a fully functional DBMS, which is a file, you need to use something like SQLite or Firebird (also a VistaDB fan, not free or open, but VERY solid and fairly affordable).

+3
source share

Could it be ...

SQL Server Compact Edition is a lightweight, built-in database engine designed to work on devices and desktop computers and focused on local data storage. Compact Edition includes a subset of SQL Server 2005 data types and shares common Transact-SQL (T-SQL) elements with data service engines.

+9
source share

In the menu "Add a new item": "Service-based database" or "Sql Server database", if it is an asp.net application. I am sure your friend meant it like "create sql express db file in Visual Studio".

However, if you want to populate an empty database with tables that match the C # model, you can create the linq2sql model and use its CreateDatabase to do this :)

You might want to check out this http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/vwd.aspx (link to a visual web developer, but it does apply).

A detailed / detailed explanation of how SQL Express can be used to validate a semi-file approach and its limitations: http://www.databasejournal.com/features/mssql/article.php/3704171/SQL-Server-2005-Express-Edition --- Part-8 --- XCopy-Deployment.htm

+1
source share

If you are using Visual Studio or Web Developer Express, there really are ways to easily create the MS SQLExpress database. Just go to "Add a new item ..." and it should be one of the available file types.

Keep in mind that you must install either Microsoft SQL Express Edition (free, like a beer!) And Microsoft SQL (very un-free !, in every sense). If you have not already done so, you cannot easily create the database file. If you have it, you can get it here .

As the other respondents noted, strictly speaking, this is NOT a C # function. MS SQL and its derivatives are database applications similar to Oracle, MySQL or PostgreSQL. It is just that Microsoft Visual Studio makes using the Microsoft database product very simple by default. Differentiation between C #, Visual Studio, and any database programs will probably give you better answers, faster no matter where you ask. :)

0
source share

Each database has a file system in some binary format that is more than likely and uses cache to control the life flow of the database.

If you are creating a database system , you will need some type of cache because you only want to read from a file if the cache has already released it.

If you have 1000 clients that click on the same bit, you certainly do not want to read/write to the file for each client request, so you want to manage the client queue and run it against the cache so that the cache knows that it doesn’t release db after its time interval for life has been reached in order to update the time interval as soon as possible, so there is no need to reload the file if it is deleted and queued again until the queue that refers to the db object is empty.

Creating a well-designed cache used by all rdbms so that duplicate objects are not created and files are not reloaded if it is not needed.

0
source share

you can use

FileDB - C # database for storing files

http://filedb.codeplex.com

There is an MVC example in the source that allows you to upload files and also supports drag and drop.

Then it saves it in only one file at the location you specify.

Like this:

 private string pathDB = @"C:\CMS-MVC\Parts\FileManager\filedb-19055\trunk\MvcTest\Data\MvcData.dat"; 

This file will save all your files in this "container".

0
source share

Perhaps you can try Microsoft LocalDB . It is file-based, but uses the low-level SQLExpress installation to host it.

0
source share

You are wrong. Databases are not developed in C #. Databases are created using a database system such as Oracle, MS SQL Server, MySQL and many others.

After creating a database using one of the above providers, you can perform actions in the database using your programming language (in your case C #) to receive data and put data into it.

-7
source share

All Articles