SQLite 3 should know before use

Source: Internet
Author: User

I. Features of SQLite

1. database size limit

The database size is limited to 2 TB (241 bytes). This is a theoretical limitation. In fact, you should limit the size of the SQLite database to less than GB to avoid running performance problems. If you need to store GB or more data in one database, consider using the Enterprise Edition database designed for this purpose. For the original article, see: SQLite FAQ Chinese Version 10th 《SQLiteDoes the database have a known size limit?Http://sqlitecn.org/faq.html#q10

2. Whether binary storage is supported

SQLite 3.0 supports storing BLOB data in any field, regardless of the type of field declaration. For the original article, see: SQLite FAQ Chinese Version 12th 《SQLiteWhether BLOB is supportedType?Http://sqlitecn.org/faq.html#q12 SQLite data type: http://hi.baidu.com/weiyousheng/blog/item/d4b5d7d64766652807088b04.html

3. Transaction Processing

Supported

4. Multithreading

SQLite locks the entire database file for reading/writing. this means that if any process reads a part of the database, no other process can write any part of the database. similarly, if any process writes data to the database, no other process can read any part of the database. this is not a problem in most cases. in these cases, each program uses the database for a short period of time and is not exclusive, so that the lock may take up to dozens of milliseconds. however, if some programs require high concurrency, they need to find other solutions.

Reference: SQLite FAQ Chinese Version 7th 《Can multiple applications or multiple examples of the same application simultaneously access the same database file?"

8th question 《SQLiteIs it thread-safe?"

5. Security

Password Logon is supported. After you set the logon password, the database file content will be encrypted and garbled characters will be displayed in a text tool. Otherwise, you will be able to see the SQL statements for table creation.

Http://www.sqlite.com.cn/MySqlite/3/253.Html of SQLite database encryption Solution

6. Index

Supported

Ii. logon Password

1. When you create a database using the software, enter the password, for example, 123, and enter the system for operation. However, you cannot open the database either by adding "Password = 123" to the Connection string or by using Connection. SetPassword (123 ).

2. Set the password when creating a database using a program

If the connection string specifies that the database does not exist and New = true, the database is automatically created. Set the password using the SetPassword attribute of Connection. However, if the same problem occurs, you cannot open the database using the interface software.

 

Solution: (I feel this method is a bit dumb. If you have a good solution, please kindly advise me)

1. Use the interface software to create a database and perform relevant operations, such as table structure creation and dictionary information entry.

2. When using the program: for the first time, use Connetion. ChangePassword to set the password. A password is required for all future operation requests.

3. Adjust the database structure if necessary. You can use the ChangePassword method to set the password to null, and then use the interface to operate the software to open the database.

Note: The ChangePassword method can only be executed after Connection is opened. To change the password, you must know the original password.

 

Iii. Interface operating software

SQLite2009 Pro Enterprice Manager [SQLite v3.6.11]

 

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.