Data storage--sqlite Database storage 2

Source: Internet
Author: User
Tags logical operators sqlite sqlite database

I. Constraints on tables

1. Unique constraints

1-field content (Multi-field content merge) Unique, cannot have duplicate rows

2-the same table can have multiple unique constraints

2. Check constraints

1-Ensure that the requirements are met before saving

2-Validation of the range of values for field data

3. Maintaining integrity between tables

3. FOREIGN KEY constraints

1-The primary key is associated to a field in another table, which is the foreign key

2-Requirement: The foreign key is added or modified, the data must exist in the primary key table; When the primary key field is modified or deleted, the data does not exist in the external key table.

Two. Rules for building tables

Conforms to three paradigms:

1. First paradigm: The meaning of field expression is single, non-split

2. Second paradigm: Avoid data redundancy, split redundant data into multiple tables, and correlate between tables

3. Third paradigm: avoiding transmission of dependence

4. Balance the paradigm and redundancy to achieve the best results for increased efficiency

Three. SQL statements

1. Classification

1-Data Definition language DDL

2-Data Control Language DCL

3-Data Management language DML

4-Data Query Language DQL

2. Operators

1-Arithmetic operator: + 、-、 *,/

2-Comparison operators: >,>=,<,<=,=,!=, <>

3-logical operators: and with, or or, not non-

4-string Operator: Join operation | |, enclosed in single quotation marks, representing the string

3. Features

1-third-generation languages

2-Case insensitive

Data storage--sqlite Database storage 2

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.