跳转至

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语法的,网上已有非常完善的教程,比我的笔记写得好多了,因此我的笔记到此为止。下面是一些教程推荐: