数据库–SQL(Database — SQL)

DDL(数据描述语言)

DML(数据操纵语言)

DCL(数据控制语言)

QL(表达用户需求,数据描述语言)

DIstinct 添加后 消除重复元组

SQL基本架构 :

1.SELECT 【DIstinct 】要查什么     //target-list

2.FROM 涉及到的表(从哪些表查)//relation-list

3.WHERE\REQUIRE?  结果满足什么条件   //relation-list

大致操作步骤:(概念上理解)1. 笛卡尔乘积 汇成一个大表,先从From开始

2. 满足的条件(筛选)WHERE\REQUIRE?

3.target-list(投影)SELECT 【DIstinct 】要查什么     //target-list

4.查看是否存在DIstinct ,若是,则消除重复元组。否则结束SQL。

————————

DDL (data description language)

DML (data manipulation language)

DCL (data control language)

QL (express user requirements, data description language)

Distinct # de duplicate tuples after adding

SQL basic architecture:

1. Select [distinct] what to check / / target list

2. From table involved (from which table to check) / / relation list

3.WHERE\REQUIRE? What conditions do the results meet / / relation list

General operation steps: (conceptual understanding) 1 Cartesian products , are combined into a large table, starting with from

2. Conditions met (screening) where \ require?

3. Target list select [distinct] what to check / / target list

4. Check whether distinct exists. If so, eliminate duplicate tuples. Otherwise, end SQL.