Learn about embedded databases (SQLite, Firebird)

Source: Internet
Author: User

I recently studied embedded databases with two main representatives: SQLite and Firebird (embed ). Is ibexpert.

Both databases provide. NET data.ProgramIt is undoubtedly good news for us who are engaged in. net.

So how to use it in. Net?

SQLite is very convenient. You only need to add its ado.net DLL to access it directly. Of course, its connection string is

SQLite is undoubtedly the smallest single-file program with a size of 400 Kb, and the database files it generates are also single files. It supports most sql92 standards, but unfortunately it does not support foreign keys and stored procedures. The latest version is version 6.11, with its third-party graphical gui. I use sqlitespy.

Firebird is not a pure embedded database, but embed is only one of its many versions. However, it is also very small, and the total number of DLL is less than 5 MB, But it supports a vast majority of sql92 and sql99 standards, like a first! The latest version is 2.1, which is specially written in graphical GUI.

But Firebird has to pay for it. First, add the DLL of its ado.net, and then add the DLL of the database to the project root directory. You can leave it in the root directory, but specify the dll path in the connection string. There are 6 files in total: fbembed. dll, Firebird. MSG, ib_util.dll, icudt30.dll, icuin30.dll, and icuuc30.dll. Fbembed. dll is the main file.

The connection string is written as follows:

 

Fbconnectionstringbuilder cs = new fbconnectionstringbuilder ();
CS. Database = @ "J: \ ABC. FDB ";
CS. servertype = fbservertype. Embedded; // This sentence cannot be dropped.
// If it is not placed in the root directory, You need to specify the path in the following sentence. However, if it is an Asp.net program, you must write this sentence for display declaration.
CS. clientlibrary = @ "bin \ fbembed. dll ";
Fbconnection con = new fbconnection (CS. tostring ());
 
 

Below we can write down according to the general method of ado.net.

These two databases are different from SQL Server databases and need to be carefully checked in the document. I will not talk about them here.

In short, these two databases are rare!

Refer:

Official SQLite Website:

Www.SQLite. Org

SQLite ChineseCommunity:

Www.SQLite.Com.cn

Firebird Official Website:

Http://www.firebirdsql.org

Firebird Chinese community:

Http://www.firebird.net.cn

Firebird connected to the Embedded Version

Http://www.host01.com/article/Net/00020003/0562810192156410.htm

Performance Comparison of SQLite, access, and Firebird

Http://www.cnblogs.com/kevin-moon/archive/2008/12/01/1344658.html

Firebird wins when a database is selected

Http://s0o0e.javaeye.com/blog/251636

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.