Home >Database >SQL >What language is sql language?

What language is sql language?

angryTom
angryTomOriginal
2019-08-03 10:40:4969208browse

What language is sql language?

Structured Query Language (SQL), referred to as SQL, is a special-purpose programming language. It is a database query and programming language used for accessing data and querying. , update and manage relational database systems.

Related recommendations: MySQL introductory video

Recommended tutorial: SQL database Tutorial

Structured Query Language is a high-level, non-procedural programming language that allows users to work on high-level data structures. It does not require users to specify the data storage method, nor does it require users to understand the specific data storage method, so different database systems with completely different underlying structures can use the same structured query language as the interface for data input and management. Structured Query Language statements can be nested, which makes it extremely flexible and powerful.

The SQL language was proposed by Boyce and Chamberlin in 1974 and was first implemented on SystemR, a relational database system developed by IBM. Because of its outstanding advantages such as rich functions, convenient and flexible use, simple and easy to learn language, it is very popular among the computer industry and computer users. In October 1980, SQL was approved by the Database Committee X3H2 of the American National Standards Institute (ANSI) as the American standard for relational database languages. Standard SQL was announced in the same year. Shortly thereafter, the International Organization for Standardization (ISO) also made the same decision. .

SQL can be functionally divided into three parts: data definition, data manipulation and data control.

 The core part of SQL is equivalent to relational algebra, but it has many features that relational algebra does not have, such as aggregation, database updates, etc. It is a comprehensive, versatile, and extremely powerful relational database language. Its characteristics are:

 1. Integration of data description, manipulation, control and other functions.

 2. Two ways of use, unified grammatical structure. SQL can be used in two ways. One is online interactive use. SQL in this way is actually used as a self-contained language. Another way is to embed it into some high-level programming language (such as C language, etc.) for use. The former method is suitable for non-computer professionals, and the latter method is suitable for professional computer personnel. Although they are used in different ways, the grammatical structure of the languages ​​used is basically the same.

 3. Highly non-procedural. SQL is a fourth-generation language (4GL). Users only need to ask "what to do" and do not need to specify "how to do it". Access path selection and specific processing operations are automatically completed by the system.

 4. The language is concise, easy to learn and use. Although SQL has powerful functions, the language is very concise, and only 9 verbs are used for the core functions. The syntax of SQL is close to spoken English, so it is easy for users to learn and use.

Function

SQL has data definition, data manipulation and data control.

1. SQL data definition function: Able to define the three-level schema structure of the database, namely external schema, global schema and internal schema structure. In SQL, the external schema is called View, and the global schema is referred to as Schema. The internal schema is automatically implemented by the system based on the database schema, and generally does not require user intervention.

 2. SQL data manipulation functions: including data insertion, deletion and modification of basic tables and views, especially strong data query functions.

3. SQL data control function: mainly controls user access rights to ensure system security.

Language features

Uniform SQL style

SQL can independently complete the database life cycle All activities, including defining relational schema, recording data, establishing database, querying, updating, maintaining, database reconstruction, database security control and a series of operations, provide a good environment for database application system development. After being put into operation, the model can be gradually modified at any time as needed without affecting the operation of the database, thus making the system highly scalable.

Highly non-procedural

The data manipulation language of the non-relational data model is a process-oriented language. When using it to complete user requests, the access path must be specified. When using SQL to perform data operations, the user only needs to ask "what to do" instead of "how to do it". Therefore, the user does not need to know the access path. The selection of the access path and the operation process of the SQL statement are automatically completed by the system. This not only greatly reduces the burden on users, but also helps improve data independence.

Collection-oriented operation method

SQL uses a set operation method. Not only can the search result be a collection of tuples, but the object of an insertion, deletion, and update operation can also be a collection of tuples.

Provides two usage methods with the same syntax structure

SQL is both a self-contained language and an embedded language. As a self-contained language, it can be used independently for online interaction. Users can directly enter SQL commands on the terminal keyboard to operate the database. As an embedded language, SQL statements can be embedded into high-level language (such as C, C#, JAVA) programs for programmers to use when designing programs. Under two different usage methods, the syntax structure of SQL is basically the same. This provides two different operation modes with a unified syntax structure, providing users with great flexibility and convenience.

The language is concise, easy to learn and use

SQL is extremely powerful, but due to its clever design, the language is very concise and completes the core functions of data definition, data manipulation, and data control. Only 9 verbs are used: CREATE, ALTER, DROP, SELECT, INSERT, UPDATE, DELETE, GRANT, REVOKE. Moreover, the syntax of SQL language is simple and close to spoken English, so it is easy to learn and use.

The above is the detailed content of What language is sql language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is sql?Next article:What is sql?