One, Memory database:
In SQLite, a database is usually stored in a disk file. In some cases, however, we can make the database always reside in memory. One of the most common ways is when calling Sqlite3_open (), the database filename parameter
Today, a friend of the test SQLite, and then came to the conclusion that: SQLite efficiency is too low, batch insert 1000 records, incredibly time-consuming 2 minutes!
Here is the test code he sent me. I'm dizzy ~~~~~~.
Using System.Data;
Using
In the SQL name, if not exists if it does not exist, if exists if it exists.
Below, learn the use of both.
A to determine if the database does not exist
Copy Code code as follows:
If not EXISTS (SELECT * from sys.databases WHERE
This article illustrates the method of Python3 to realize the connection of SQLite database, which has good reference value for Python learning. Share for everyone to use for reference. The specific methods are as follows:
The instance code is as
Additional information: V5.7.4.4 Can ' t find the System.Data.SQLite.dll more info: mixed-mode assemblies are generated for the "v2.0.50727" version of the runtime and cannot be run at 4.0 when no additional information is configured The assembly is
Configuring the database environment requires 3 steps:1. Install Slqite plug-inExecute the command at the corresponding terminal of the Ionic project directory:NPM Install Cordova-plugin-sqlite2, Installation PouchdbExecute the command at the
Open Databasevar db = new Sqlite3. Database (' xx.db ');Close the databaseDb.close ();Db.run (' xx '); The run function of a database object can execute any SQL statement that is not typically used to execute a queryCreate alter and the likeIncrease:
This article was reproduced from: http://www.cnblogs.com/error404/archive/2012/03/21/2409898.htmlFunctional characteristicsTable structure design, data maintenance, DDL generation, encrypted database support, sqlite2,3 supportThe only drawback,
Lab Report
Course Name
Mobile Internet development based on Android platform
Date of experiment
May 6
Name of the experimental project
SQLite database Operations
Location of the experiment
S30
Experiment 8 SQLite Database operationsPurposeDesign a Personal Address book, master the development of the database under the Android platform, the personal Address Book mainly includes the contact list and contact details and other
Lab Report
Course Name
Mobile Internet development based on Android platform
Date of experiment
May 4, 2016
Name of the experimental project
SQLite database Operations
Location of the experiment
Http://stackoverflow.com/questions/531035/how-to-do-if-not-exists-in-sqliteHow is this?INSERT OR IGNORE INTO EVENTTYPE (EventTypeName) VALUES ‘ANI Received‘(Untested as I don ' t have SQLite ... however this link is quite descriptive.)Additionally,
Ease of use. In fact, a mature project must be a data persistence package, so the bottom of the use of core data or sqlite, should not be the business logic developers concerned. Therefore, even people who are accustomed to writing SQL queries
SQLite data files to the Linux memory file system/dev/shm/data.sqlite3, is the memory-level read and write performance of the SQL system.Use SQLite to implement memory key value storage:CREATE TABLE IF not EXISTS memory (Key VARCHAR (+) not NULL
Before using a lightweight database like SQLite, only Sqlserver2008 was used to make additions and deletions to the data, and the company was using a large Oracle database that was not actually used. At that time the database is very large, but
Connecting to a databaseThe following PHP code shows how to connect to an existing database. If the database does not exist, it will be created and a database object will be returned.PHPclassMyDBextendsSQLite3 {function__construct () {$this->open ('
public void Savetodb (DataTable dt) {/* Todo:sqlite does not provide a mechanism for bulk insertions and requires that all data be updated through a transaction * http://www The. cnblogs.com/hbjohnsan/p/4169612.html * Eorr database is
Reference--http://www.cnblogs.com/likebeta/archive/2012/06/17/2552784.htmlhttp://babybandf.blog.163.com/blog/static/61993532010326133751/Execute SQL statementGet the result set and storeNo callback functionint sqlite3_get_table ( sqlite3 *db,/
SQL statement FormatSQL instruction format: All SQL instructions are represented by a semicolon (;) end, and two minus signs (--) are the comments.Such as:Sqlite>create studen_table (\Stu_no interger PRIMARY KEY, \Name Text Not null,\Id Interger
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