IOS Data Storage-03SQLite Basics

Source: Internet
Author: User

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

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.