Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL: Standards and Flavors A presentation for CS157B by David Wortham.

Similar presentations


Presentation on theme: "SQL: Standards and Flavors A presentation for CS157B by David Wortham."— Presentation transcript:

1 SQL: Standards and Flavors A presentation for CS157B by David Wortham

2 SQL Definition SQL: Structured Query Language SQL: Structured Query Language Invented in 1974 by Donald Chamberlin and Raymond Boyce for IBM Invented in 1974 by Donald Chamberlin and Raymond Boyce for IBM Used for creation and modification of Relational DataBase data and schema Used for creation and modification of Relational DataBase data and schema Multiple Standard Revisions and Multiple Flavors (Implementations) exist Multiple Standard Revisions and Multiple Flavors (Implementations) exist

3 Standard Revisions Differences: Revisions successively introduced additional features Revisions successively introduced additional features Revisions are mostly Backwards- Compatible with older standards Revisions are mostly Backwards- Compatible with older standardsSimilarities: Ratified by Standards Organizations Ratified by Standards Organizations Incompletely implemented by vendors Incompletely implemented by vendors

4 Standard Revisions and Dates of Standardization SEQUEL/Original SQL - 1974 SEQUEL/Original SQL - 1974 SQL-86 (ANSI/ISO) - 1986 SQL-86 (ANSI/ISO) - 1986 SQL-92 - 1992 SQL-92 - 1992 SQL:1999 - 1999 SQL:1999 - 1999 SQL:2003 - 2003 SQL:2003 - 2003 SQL:2006 - 2006 SQL:2006 - 2006

5 Standards Revisions: SEQUEL Original definition of SQL Original definition of SQL Mostly defined data manipulation and schema definition controls Mostly defined data manipulation and schema definition controls

6 Standards Revisions: SQL-86 Ratification and acceptance of a formal SQL standard by ANSI and ISO Ratification and acceptance of a formal SQL standard by ANSI and ISO

7 Standards Revisions - SQL:92 New datatypes: DATE, TIME, TIMESTAMP, INTERVAL, VARCHAR New datatypes: DATE, TIME, TIMESTAMP, INTERVAL, VARCHAR New scalar operations: string concatenation, date and time mathematics New scalar operations: string concatenation, date and time mathematics New set operations: UNION JOIN, NATURAL JOIN New set operations: UNION JOIN, NATURAL JOIN Schema changes via ALTER and DROP Schema changes via ALTER and DROP Among others… Among others…

8 Standards Revisions - SQL:99 Adds User Defined Types (UDTs) to SQL Adds User Defined Types (UDTs) to SQL Among others… Among others…

9 Standards Revisions - SQL:2003 XML-related features XML-related features MERGE statement defined MERGE statement defined SEQUENCE generation SEQUENCE generation Among others… Among others…

10 Standards Revisions – SQL:2006 Increased support for XML Increased support for XML Support for XQuery, an XML-SQL interface standard Support for XQuery, an XML-SQL interface standard

11 Flavors of SQL Most implementations do not implement the entire standard Most implementations do not implement the entire standard Schemas and Stored Procedures for different flavors are rarely portable Schemas and Stored Procedures for different flavors are rarely portable Timestamp data types are usually proprietary Timestamp data types are usually proprietary Common Flavors: Oracle Oracle MySQL MySQL SQLite SQLite Postgres Postgres MSQL (Microsoft) MSQL (Microsoft) Microsoft Access Microsoft Access

12 Flavors: Stored Procedure Support Common Procedural Languages (PLs): ANSI/ISO Standard: SQL/PSM ANSI/ISO Standard: SQL/PSM IBM: SQL PL IBM: SQL PL Microsoft/Sybase: T-SQL Microsoft/Sybase: T-SQL MySQL: MySQL MySQL: MySQL Oracle: PL/SQL Oracle: PL/SQL PostgreSQL: PL/pgSQL PostgreSQL: PL/pgSQL

13 Flavors: MySQL 5.x MySQL 5.x Implements most of SQL:99 standard including: Stored Procedures Stored Procedures Triggers Triggers XA transactions XA transactions

14 Flavors: Oracle 10g Release 2 Implements much of SQL:2003 Implements much of SQL:2003 Complete Listing of CORE feature support: http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_standard_sql003.htm Complete Listing of CORE feature support: http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_standard_sql003.htm

15 Flavors: SQLite 3.x SQLite 3.x Implements most of SQL:92 standard except: FOREIGN KEY constraints FOREIGN KEY constraints Complete trigger support Complete trigger support Complete ALTER TABLE support Complete ALTER TABLE support Nested transactions Nested transactions RIGHT and FULL OUTER JOIN RIGHT and FULL OUTER JOIN Writing to VIEWs Writing to VIEWs GRANT and REVOKE GRANT and REVOKE

16 Flavors: PostgreSQL 8.4 Implements most of SQL:2003 except: Implements most of SQL:2003 except: MERGE statement MERGE statement Assertions, Subqueries in CHECK Assertions, Subqueries in CHECK Some flagging features Some flagging features Many array features Many array features BLOB data type BLOB data type Comprehensive list: http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html Comprehensive list: http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html

17 Vendor MarketShare 1 Source: JoinVision E-Services GmbH, July 2006

18 Vendor MarketShare 2 "Relational Databases Rule the Roost”, SD Times in July 2004

19 References MySQL :: MarketShare http://www.mysql.com/why-mysql/marketshare/ MySQL :: MarketShare http://www.mysql.com/why-mysql/marketshare/ http://www.mysql.com/why-mysql/marketshare/ SQL:1999 http://www.service-architecture.com/database/articles/sql1999.html SQL:1999 http://www.service-architecture.com/database/articles/sql1999.html http://www.service-architecture.com/database/articles/sql1999.html PostgreSQL supported and unsupported standard features http://developer.postgresql.org/pgdocs/postgres/features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html PostgreSQL supported and unsupported standard features http://developer.postgresql.org/pgdocs/postgres/features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/features-sql-standard.html http://developer.postgresql.org/pgdocs/postgres/unsupported-features-sql-standard.html SQL Features That SQLite Does Not Implement http://www.sqlite.org/omitted.html SQL Features That SQLite Does Not Implement http://www.sqlite.org/omitted.html http://www.sqlite.org/omitted.html


Download ppt "SQL: Standards and Flavors A presentation for CS157B by David Wortham."

Similar presentations


Ads by Google