词条 | SQL:1999 |
释义 |
SQL:1999 (also called SQL 3) was the fourth revision of the SQL database query language. It introduced a large number of new features, many of which required clarifications in the subsequent 2003. In the meanwhile SQL:1999 is deprecated. SummaryThe ISO standard documents were published between 1999 and 2002 in several installments, the first one consisting of multiple parts. Unlike previous editions, the standard's name used a colon instead of a hyphen for consistency with the names of other ISO standards. The first installment of SQL:1999 had five parts:
Three more parts, also considered part of SQL:1999 were published subsequently:
New features{{expand section|date=November 2012}}Data typesBoolean data typesThe SQL:1999 standard calls for a Boolean type,[1] but many commercial SQL servers (Oracle Database, IBM DB2) do not support it as a column type, variable type or allow it in the results set. Microsoft SQL Server is one of the few database systems that properly supports BOOLEAN values using its "BIT" data type. Every 1–8 bit fields occupies one full byte of space on disk. MySQL interprets "BOOLEAN" as a synonym for TINYINT (8-bit signed integer).[2] PostgreSQL provides a standard conforming Boolean type [3] Distinct user-defined types of powerSometimes called just distinct types, these were introduced as an optional feature (S011) to allow existing atomic types to be extended with a distinctive meaning to create a new type and thereby enabling the type checking mechanism to detect some logical errors, e.g. accidentally adding an age to a salary. For example: creates two different and incompatible types. The SQL distinct types use name equivalence not structural equivalence like typedefs in C. It's still possible to perform compatible operations on (columns or data) of distinct types by using an explicit type Few SQL systems support these. IBM DB2 is one those supporting them.[4] Oracle database does not currently support them, recommending instead to emulate them by a one-place structured type.[5] Structured user-defined types{{main|structured type}}These are the backbone of the object-relational database extension in SQL:1999. They are analogous to classes in objected-oriented programming languages. SQL:1999 allows only single inheritance. Common table expressions and recursive queriesSQL:1999 added a WITH [RECURSIVE] construct allowing recursive queries, like transitive closure, to be specified in the query language itself; see common table expressions. Some OLAP capabilitiesGROUP BY was extended with ROLLUP, CUBE, and GROUPING SETS. Role-based access controlFull support for RBAC via CREATE ROLE. KeywordsSQL:1999 introduced the UNNEST keyword.[6] References1. ^ISO/IEC 9075-2:1999 section 4.6 Boolean types 2. ^{{cite web|url=http://dev.mysql.com/doc/refman/5.0/en/other-vendor-data-types.html |title=MySQL :: MySQL 5.0 Reference Manual :: 11.4 Using Data Types from Other Database Engines |publisher=Dev.mysql.com |date=2010-01-09 |accessdate=2014-01-30}} 3. ^PostgreSQL documentation about Boolean Type 4. ^{{cite web|url=http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.intro%2Fsrc%2Ftpc%2Fdb2z_distincttypes.htm |title=IBM Information Management Software for z/OS Solutions Information Center |publisher=Publib.boulder.ibm.com |date= |accessdate=2014-01-30}} 5. ^{{cite web|url=http://docs.oracle.com/cd/B19306_01/server.102/b14200/ap_standard_sql003.htm |title=Oracle Compliance To Core SQL:2003 |publisher=Docs.oracle.com |date= |accessdate=2014-01-30}} 6. ^{{cite book| last1 = Jones| first1 = Arie| last2 = Stephens| first2 = Ryan K.| last3 = Plew| first3 = Ronald R.| last4 = Garrett| first4 = Robert F.| last5 = Kriegel| first5 = Alex| chapter = Appendix B ANSI and Vendor Keywords| title = SQL Functions Programmer's Reference| url = https://books.google.com/books?id=QcE1qCobUfcC| publisher = John Wiley & Sons| publication-date = 2005| page = 680| isbn = 9780764598074| accessdate = 2016-05-16}} Further reading
2 : SQL|Declarative programming languages |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。