“This is the fourth day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

Today is still the same joke, database system principles, and then the last book said, today is an overview of SQL

The characteristics of SQL

  1. SQL is not a language specific to a particular database vendor
  2. SQL is simple and easy to learn
  3. Although SQL looks simple, it is actually a powerful language that uses its language elements flexibly and can perform very complex and advanced database operations (the SQL language is case-insensitive)

The composition of SQL

  • Data Definition Language (DDL)

    It is used to create, delete, and modify databases and objects in the database. Examples are create, ALTER, and DROP

  • Data Manipulation Language (DML)

    It is mainly used to manipulate various objects in the database, especially to retrieve and modify data. Such as SELECT, INSERT, update, delete

  • Data Control Language (DCL)

    Revoke Is used for security management, such as grant, revoke

  • Embedded and dynamic SQL rules

    It provides a standard method for SQL language to be used in high-level programming languages, so as to be suitable for more complex applications

  • SQL call and session rules

    SQL routines and invocation rules are included to improve SQL’s flexibility, effectiveness, shareability, and more high-level language characteristics

MYSQL

Mysql Usage Basics

The mysql database management system is used to construct various information management systems or the application environment of Internet websites

  • LAMP
  • WAMP

Mysql the SQL

As a relational database management system, mysql complies with THE SQL standard and provides support for data definition language DDL, data manipulation language DML, data control language DCL, and also supports the three-level schema structure of relational database. In addition, to facilitate user programming, mysql has added some extended language elements on the basis of SQL standard.

These language elements include

  • constant

    A quantity whose value does not change during the execution of a program

  • variable

    Used to temporarily store data

  • The operator

    • Arithmetic operators (addition, subtraction, multiplication, division, modulo)
    • Bitwise operators (bitwise and, bitwise or, bitwise xor, bitwise inverse, bitwise right, bitwise left)
    • Comparison operators (equal to, greater than, less than, greater than or equal to, less than or equal to, not equal to, equal or both null)
    • Logical operators (NOT or! Logic, AND OR && logic AND, OR, OR | | logic, OR, XOR logic XOR)
  • expression

    Combinations of constants, variables, column names, complex calculations, operators, and functions

  • Built-in function

    • Mathematical function
    • Aggregation function
    • String function
    • Date and time functions
    • Encryption function
    • Control flow function
    • Formatting function
    • Type conversion function
    • System information function
  • Process control statements and annotations, etc

Please keep going!!