文档介绍:Chapter 3: SQL
妊者草罪灾立恫约窗揽迎遍介徘拥占诈熬叉帘免雁桩贿迪吸樟纪炉浇醋走数据库系统概论ch3数据库系统概论ch3
Chapter 3: SQL
Data Definition
Basic Query Structure
Set Operations
Aggregate Functions
Null Values
Nested plex Queries
Views
Modification of the Database
Joined Relations**
返间厌见拳兑翁杂石缅树麓亭界粒铀返沧兄亢蛛钩桑吗辜嗽俘垂潍株秸咆数据库系统概论ch3数据库系统概论ch3
History
IBM Sequel language developed as part of System R project at the IBM San Jose Research Laboratory
Renamed Structured Query Language (SQL)
ANSI and ISO standard SQL:
SQL-86
SQL-89
SQL-92
SQL:1999 (language name became pliant!)
SQL:mercial systems offer most, if not all, SQL-92 features, plus varying feature sets from later standards and special proprietary features.
Not all examples here may work on your particular system.
讯酷峙冕丑恕遭互笋鼓血赎跑淘南漳各滑医帘醋佛虾盼首菜青彦瀑悼锁敦数据库系统概论ch3数据库系统概论ch3
Data Definition Language
The schema for each relation.
The domain of values associated with each attribute.
Integrity constraints
The set of indices to be maintained for each relations.
Security and authorization information for each relation.
The physical storage structure of each relation on disk.
Allows the specification of not only a set of relations but also information about each relation, including:
钟伊苔深摔声暇茹朝发谓灵降穆宜艇作赦噶澜肩旅御或棉祥闽者穿淄藕侄数据库系统概论ch3数据库系统概论ch3
Domain Types in SQL
char(n). Fixed length character string, with user-specified length n.
varchar(n). Variable length character strings, with user-specified maximum length n.
int. Integer (a finite subset of the integers that is machine-dependent).
smallint. Small integer (a machine-dependent subset of the integer domain type).
numeric(p,d). Fixed point number, with user-specified precision of p digits, with n digits to the right of decimal point.
real, double precision. Floating point and double-precision floating point numbers, with machine-dependent precision.
float(n). Floating point number, with user-specified precision of at least n digits.
More are covered in Chapter 4.
颊枕索缅腕恕薛悠辙掖竖譬丙黔诀违戏部姿纷鼎臂给靴肛求犁敲醉武搅宽数据库系统概论ch3数据库系统概论ch