- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ch3SQL
第三章:SQL Chapter Data Definition 数据定义 Basic Query Structure 基本查询结构 Set Operations 集合操作 Aggregate Functions 聚集函数 Null Values 空值 Nested Subqueries 嵌套子查询 Derived Relations 派生关系 Views 视图 Modification of the Database 数据库更新 Joined Relations 连接关系 3.1 History IBM Sequel language developed as part of System R project at the IBM San Jose Research Laboratory起源于IBM实验室 Renamed Structured Query Language (SQL) ANSI and ISO standard SQL:版本 SQL-86 SQL-89 SQL-92 SQL:1999 (language name became Y2K compliant!) SQL:2003 Schema Used in Examples 3.2 Data Definition Language (DDL) 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. 物理存储 3.2.1 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. 定点数 3.2.1 Domain Types in SQL 基本域类型 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.精度为N的浮点数 Null values are allowed in all the domain types. Declaring an attribute to be not null prohibits null values for that attribute空 create domain construct in SQL-92 creates user-defined domain types create domain person-name char(20) not null Date/Time Types in SQL (Cont.) date. Dates, containing a (4 digit) year, month and date E.g. date ‘2001-7-27’ time. Time of day, in hours, minutes and seconds.
原创力文档


文档评论(0)