Sqlite3 is an open-source, embedded relational database with good portability, ease of use, and small memory overhead sqlite3 is untyped, meaning that you can save any type of data to any field in any table. For example, the following statement is valid: CREATE TABLE T_person (name, age); • To ensure readability, it is recommended that you add the field type: Create TABLE T_person (name text, age integer); sqlite3 Common 5 Types of data: text, Integer, float, Boolean, blob in iOS to use SQLite3, you need to add a library file: Libsqlite3.dylib and import the main header file, which is a C-language library SQLite3 related actions in the Application 1. Create a database (SQLITE3_OPENDB) 2. Step Into action (sqlite3_exec) – Create data table – Data manipulation • Insert data • Update data • Delete Data 3. Query Operation –sqlite3_prepare _V2 check the legality of SQL –sqlite3_step get query results row by line –sqlite3_coloum_xxx get the content of the corresponding type –sqlite3_finalize release stmt
IOS Sqllite Action (ii)