Getting Started with SQLite

Source: Internet
Author: User
Tags sqlite

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 databases of MySQL and PostgreSQL.
    • SQLite是无类型的
What is a database
    • A database is a warehouse that organizes, stores, and manages data in accordance with its data structure.

    • The database can be divided into 2 major categories

      • relational database (Mainstream)
      • Object Type Database
    • Common relational database

      • PC-side: Oracle, MySQL, SQL Server, Access, DB2, Sybase
      • Embedded \ Mobile Client: SQLite
    • Characteristics of relational database

      1. Accessing Data in tabular form
      2. Each row represents a complete record
      3. Establish a "relationship" between a foreign key and another data table
        • Enables easy data maintenance
        • Storage space can save
        • You can split a data and maintain them!
      * Oracle, SQL Server, MySQL...服务端使用的数据库,需要安装,需要独立的机器,需要单独配置* SQLite 零成本,就是一个文件,存储着需要的数据* MAC 中内置了 SQLite,什么都不需要,就可以直接使用!
SQLite in iOS development
    1. The database file is a separate file, in actual development, the database file is usually saved in the sandbox document/cache directory
    2. In the program development, it is necessary to operate the database file through the T_sql language!
Types of SQL statements
    1. Data definition statements (ddl:data definition Language)

      • Includes operations such as Create and drop
      • Create a new table or delete a table in the database (CREATE table or drop tables)
    2. Data manipulation statements (Dml:data manipulation 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 query Language)

      • can be used to query for data in a table
      • Keyword SELECT is the most used operation for DQL (and all SQL)
      • Other dql commonly used keywords are where,order by,group by and having

Getting Started with SQLite

Related Article

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.