SQL
SQL,即Structured English Query Language(结构化查询语言),是一种非过程式语言(只需要告诉计算机需要访问的数据,而不需要告诉计算机如何访问数据),由DDL、DML和DCL组成
DDL的基本功能
- Define the schema for each relation. 定义数据结构
- Define the domain of values associated with each attribute. 定义attribute的取值范围
- Define the integrity constraints. 确定约束
- Define the physical storage structure of each relation on disk. 确定物理存储结构
- Define the indices to be maintained for each relations. 确定要为每个关系维护的索引
- Define the view on relations. 确定关系视图
SQL语法
这一章节剩下的部分都是关于SQL语法的,网上已有非常完善的教程,比我的笔记写得好多了,因此我的笔记到此为止。下面是一些教程推荐:
-
一小时上手MySQL视频,包含MySQL的安装、使用以及基础的SQL语法。
-
较为详细的MySQL介绍,涉及比较多的语法细节。
-
内容覆盖较为全面,但一些语法细节还是要在实操中练习。
-
大佬可以直接参阅官方技术文档orz