Introduction to using SQLite database in C # (top)

Source: Internet
Author: User
Tags sqlite database

"SQLite database"

SQLite is an open-source, lightweight, desktop-based database that stores almost all database features, including definitions, tables, indexes, and data itself, in a single file. SQLite is written in C, which has good performance in memory consumption, file volume, operation performance and simplicity. SQLite can run on multiple platforms, including mainstream systems such as Windows/linux/unix, and also support embedded systems such as Android or Windows Mobile.

SQLite has the following characteristics: The standard for implementing most SQL92, including transactions (atomicity, consistency, isolation, and persistence), triggers, and most complex queries. Do not type check for inserted or updated data, for example, you can insert a string into an integer column.

There are 5 types of data supported for SQLite's current version 3:

1.NULL: null value.

2.INTEGER: Signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes, as appropriate.

3.REAL: Floating point number.

4.TEXT: text, stored in character sets UTF-8, Utf-16be, or Utf-16le, depending on the database encoding format.

5.BLOB: A binary byte sequence that generally stores objects that are not easily represented by numbers or text, but can theoretically store anything.

If compared with some of the commonly used databases, it can be found that there is at least bit type and datetime type, in fact, in SQLite, the bit type is usually the same integer type, datetime with the text of the common type. When the integer field value is 0 or 1 o'clock, SQLite can use it as a bit type (true or false), and SQLite can use it as a datetime when the text Type field value conforms to a certain format. The commonly used text format that can be considered datetime is YYYY-MM-DD or Yyyy-mm-dd HH:mm:ss. Note: The string "2012-01-09" is a valid date format, and the string "2012-1-9", "2012-1-09", and "2012-01-9" are not valid as DateTime.

"How to connect SQLite in C #"

The most common is the System.Data.SQLite.dll data access driver, which is developed by SQLite specifically for. NET design, as long as the DLL file is referenced in the project without having to install anything else.

Introduction to using SQLite database in C # (top)

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.