1. Introduction to SQLite
1. What is SQLite
SQLite is a lightweight, embedded database
SQLite consumes very little resources and requires only hundreds of K of memory in embedded devices
But the processing speed is faster than the two famous databases of MySQL and PostgreSQL.
2. What's the database
Currently the database can be divided into two main categories:
relational database (mainstream database)
3. Steps for data inventory data
Create a new database
Create a new form (table)
Add multiple fields (column, columns, properties)
Add multiple rows of records (row, each row holds the value corresponding to a field)
2. Introduction to SQL statements
Using SQL statements to manipulate data in a database
1. What is SQL
SQL (structuredquerylanguage): Structured Query Language SQL is a language for defining and manipulating data in a relational database SQL language Concise, simple syntax, studious and useful
2. What is a SQL statement
the sentence \ code written in the SQL language is the SQL statement In the process of running the program, you must use SQL statements to manipulate (add and remove, CRUD) data in the database
3. SQL Statement Features
Case insensitive
Each statement must have a semicolon; End
You can not use keywords to name tables, fields in a database
Keywords in SQL
Select,Insert,Update,Delete, from,Create,where,desc,Order, by,Group,Table,Alter,View,Indexwait
4. Types of SQL statements
1. Data definition statement (Ddl:data definitionlanguage) includes operations such as create and drop Create a new table or delete a table in the database ( CREATE table or droptables)
2, data operation statement (Dml:datamanipulation Language) include insert,update,Delete , and more The above 3 actions are used to add, modify, and delete data in a table, respectively
3. Data query Statement (dql:data querylanguage) can be used to query for data in a table keyword select is the most used operation for DQL(and all SQL) its DQL Common keywords have where,orderby, Group by and having
3. SQL statements
IOS Data Storage-03SQLite Basics