You are on page 1of 3

SQL Standards

By: Yasmeen Shabana

BSc of Electrical Engineering and Power Machines.

MSc of Software Engineering.


_____________________________________________________________________________________________

Over the past years, SQL standards have seen some new updates aimed to improve SQL
as a working language for designing and implementing database systems. The SQL:2011
standard published by ANSI (The American National Standards Institute) is made in nine parts.
Each part explains new features for a certain area of the SQL standards (ISO Standards, no
date). Most of the updates are not made in the core features of the SQL published in SQL: 1999,
but the updates are made in the optional features (Zemke, 2012).
The most interesting updates in SQL:2011 are the new non-temporal features (Zemke,
2012). We will examine two of them:
- DELETE within MERGE: allows deletion of rows from the database that are no longer needed
during the update. This new feature will save time, improve the database performance, and
enforces the database integrity by maintaining the real-world situation similar to what is in the
database. For example, deleting items from an inventory table that are obsolete is now possible
during database update and doesn’t require an additional query.
- CALL enhancements: CALL is used to invoke an SQL stored procedure. It decreases the number
of message flowing between the client and server, allows local database operations to run
remotely, allows data queue operations in SQL, and allows system APIs access remotely (IBM
Knowledge Center, no date). SQL:2011 introduced two enhancements to invoked procedures,
the use of named arguments and default input arguments as shown in the following example
(Zemke, 2012).
Example CALL statement before SQL:2011

Where P is a procedure, A and B are integer input and output parameters respectively, and
MyVar is an embedded value.
Example CALL statement after to SQL:2011
In 2016, the regular five years review of the SQL standards resulted in more updates
that were published of what is known as SQL:2016. Some updates were released, some are
under development, and some were withdrawn or merged into other parts (ISO Standards
Catalogue, 2018). The nine updated parts of ISO/IEC 9075:2016 focus on the following aspects
of SQL (ANSI SQL ISO Standards, 2017).
- Part 1: Framework.
- Part 2: Foundation.
- Part 3: Call-Level interface.
- Part 4: Persistent stored modules.
- Part 9: Management of external data.
- Part 10: Object language bindings.
- Part 11: Information and definition schemas.
- Part 13: SQL Routines and types using the Java programming language.
- Part 14: XML-Related specifications.

The foundation part (ISO/IEC 9075-2, 2016) contains an interesting update called “Row
Pattern Recognition” which supports syntax and semantics for recognising patterns in rows of a
table. This update encapsulates two features: “Row pattern recognition: FROM clause” and
“Row pattern recognition: WINDOW clause” (Melton, 2016). This update allows several rows
with the same pattern to be grouped, filtered and aggregated. It is particularly useful when
checking the rows in the database for a series of patterns to perform certain queries on them.
The “MATCH_RECOGNIZE” keyword in the syntax makes use of “FROM”, “WHERE”, “GROUP
BY”, “HAVING” and “OVER” clauses.

REFERENCES
ANSI SQL ISO Standards (2017) ISO/IEC JTC 1/SC 32 Publishes Updated SQL Database Language
Standard, www.ansi.org. Available at:
https://www.ansi.org/news_publications/news_story?menuid=7&articleid=753a952d-1244-
415b-bb92-0010750bb8cd (Accessed: 17 June 2018).
IBM Knowledge Center (no date) SQL CALL Statement. Available at:
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/ddp/rbal1stored.htm
(Accessed: 17 June 2018).
ISO Standards (no date) Publicly Available Standards. Available at:
http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html (Accessed: 17 June 2018).
ISO/IEC 9075-2 (2016) SQL Standards, Part 2: Foundation (SQL/Foundation). Available at:
https://www.iso.org/standard/63556.html (Accessed: 17 June 2018).
ISO Standards Catalogue (2018) 35.060 - Languages Used in Information Technology. Available
at: https://www.iso.org/ics/35.060/x/p/1/u/1/w/1/d/1 (Accessed: 17 June 2018).
Melton, J. (2016) ‘Row Pattern Recognition in SQL’, Information Technology. (Database
Languages, SQL Technical Reports), ISO/IEC TR 19075-5:2016(1), pp. 1–90. Available at:
http://standards.iso.org/ittf/PubliclyAvailableStandards/c065143_ISO_IEC_TR_19075-
5_2016.zip (Accessed: 16 June 2018).
Zemke, F. (2012) ‘What’s New in SQL:2011’, SIGMOD Record, 41(1), pp. 67–73.

You might also like