Basic Concepts :SQLite is an open-source, embedded relational database that implements a self-contained, 0 configuration, transactional SQL database engine. It is characterized by its high portability, ease of use, compact structure, high efficiency
Sqlite.swift is an operating framework that encapsulates SQLite3 using the pure Swift language.Characteristics:
Simple query and parameter binding interface
Secure, automated type of data access
Implicit commit and rollback
SQLite Basics What is SQLite
SQLite is a lightweight, embedded database
It occupies very low resources, in the embedded device, may only need hundreds of K of memory is enough
Its processing speed is faster than the two famous
When we write a program, we inevitably use a third-party library file, The source files (. cpp) are seldom used, most of which are the header files that are declared on the class and the libraries that encapsulate the classes (static lib or dynamic
SQLite command Line (CLP)======================================================================================. help//for help, the available commands are listed as follows:. ver//Get version. Open test.db//Open database file. Save test.db//Save a
New SQLite[Email protected] msqlite]$ sqlite3 contact.dbSQLite version 3.6.20Enter '. Help ' for instructionsEnter SQL statements terminated with a ";"CREATE table contact (ID integer auto_increment, name varchar (+) not NULL, mobile varchar (2),
1 Page Manager: is the only module that accesses the local database and logs (via the operating system API). It abstracts random access systems or byte-oriented file systems into database files (page-based random access systems). It defines a set of
Previous Blog "SQLite: Multi-threaded Operation database" is locked "solution" by registering the delay function to deal with the problem of database lock. This approach solves the problem, but the delay slows the progress when multiple threads
SQLite delete the field when prompted by a syntax error near, how to solve it? The ALTER TABLE statement in SQLite does not support drop COLUMN, only rename and addWorkaround:1. Create a temporary table that adds a field other than the field you
Create a table in front, now insert some data to him, insert the data is similar to creating a table, just the SQL language is not the same, the complete code is as follows:#include #include #include "sqlite/sqlite3.h" #define Db_nane "Sqlite/test.
I've already said how to open and close the database, this time to say how to execute the SQL statement to create a table.The function to use:Sqlite3_exec (sqlite3* db, const char *sql, Sqlite_callback callback, void *data, char **errmsg)Parameter:
In front of you. If you create a database, then we need to operate the database;But the Sqlite3 command can only operate one database at a time, what if there are multiple databases under the current path? This will require the use of additional
Sqlite itself does not have this function, FireDAC through tfdsqlitefunction added this function; Although similar effects can be achieved through some SQL statements or through views, the functions are more flexible.This example first built a score
SQLite Data Type Summary1. Strictly speaking, SQLite has no data type. SQLite uses dynamic data types, that is: the type of data depends on the data itself, not its container (field)2. Storage type (Storage Class): The representation of data after
An overview of the ORDER BY statement
The
order BY statement is used to sort the result set based on the specified column.
The order BY statement sorts records by default in ascending order.
If you want to sort records in descending
Backing Up the databaseTo make a backup copy of the database, simply does a "dump" and redirect the results to a file.Cd/home/sqlitesqlite3 sample.db dump > Sample.bak
Restoring the databaseRestoring the database from a backup are just as easy as
First, the use of actionfilterattribute to achieve rights management1. Create a menu filter class//Building a Permissions menu filter Public classMvcmenufilter:actionfilterattribute {Private BOOL_isenable =true;//whether to turn on filtering
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