ArticleslgStudy

science

SQL:2011

SQL:2011 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SQL:2011 rather than just read about it. In short: SQL:2011 or ISO/IEC 9075:2011 (under the general title "Information technology – Database languages – SQL") is the seventh revision of the ISO (1987) and ANSI (1986) standard for the SQL database query language. It was formally adopted in December 2011.

Key takeaways

  • SQL:2011 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SQL:2011 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SQL:2011 from memory before moving on to harder problems.

Reference excerpt

SQL:2011 or ISO/IEC 9075:2011 (under the general title "Information technology – Database languages – SQL") is the seventh revision of the ISO (1987) and ANSI (1986) standard for the SQL database query language. It was formally adopted in December 2011. The standard consists of 9 parts which are described in detail in SQL. The next version is SQL:2016.

New features One of the main new features is improved support for temporal databases. Language enhancements for temporal data definition and manipulation include:

Time period definitions use two standard table columns as the start and end of a named time period, with closed set-open set semantics. This provides compatibility with existing data models, application code, and tools Definition of application time period tables (elsewhere called valid time tables), using the PERIOD FOR annotation Update and deletion of application time rows with automatic time period splitting Temporal primary keys incorporating application time periods with optional non-overlapping constraints via the WITHOUT OVERLAPS clause Temporal referential integrity constraints for application time tables Application time tables are queried using regular query syntax or using new temporal predicates for time periods including CONTAINS, OVERLAPS, EQUALS, PRECEDES, SUCCEEDS, IMMEDIATELY PRECEDES and IMMEDIATELY SUCCEEDS (which are modified versions of Allen’s interval relations) Definition of system-versioned tables (elsewhere called transaction time tables), using the PERIOD FOR SYSTEM_TIME annotation and WITH SYSTEM VERSIONING modifier. System time periods are maintained automatically. Constraints for system-versioned tables are not required to be temporal and are only enforced on current rows Syntax for time-sliced and sequenced queries on system time tables via the AS OF SYSTEM TIME and VERSIONS BETWEEN SYSTEM TIME ... AND ... clauses Application time and system versioning can be used together to provide bitemporal tables

Support in database management systems SAP HANA 2.0 SP03 supports system-versioned tables using the standard select syntax FOR SYSTEM_TIME AS OF '<timestamp1>' SAP HANA 2.0 SP04 adds (partial) support for application-time versioning IBM DB2 version 10 claims to be the first database to have a conforming implementation of this feature in what they call "Time Travel Queries", although they use the alternative syntax FOR SYSTEM_TIME AS OF. Oracle 12c supports temporal functionality in compliance with SQL:2011. Versions 9, 10g and 11g implement the time-sliced queries in what they call Flashback Queries, using the alternative syntax AS OF TIMESTAMP. Notably both of Oracle's implementations depend on the database's rollback segment and so only allow temporal queries against recent changes which are still being retained for backup. Microsoft SQL Server (version 2016) implements temporal tables with SYSTEM_VERSIONING. MariaDB 10.3 implements system-versioned tables. MariaDB 10.4.3 added support for application-versioned tables. PostgreSQL requires installation of the temporal_tables extension. Temporal Tables Extension supports the system-period temporal tables only, but does not follow the SQL:2011 design. Ebean ORM supports History AS OF and VERSIONS BETWEEN queries on PostgreSQL and MySQL using triggers, history tables and views. CockroachDB has supported AS OF SYSTEM TIME queries since at least v1.0.7.

See also

Slowly changing dimension Temporal database

References

External links "SQL:2011", Catalogue (webshop), ISO. Part 1: Framework (SQL/Framework) (draft; PDF), JTC1SC32, 2011-08-06. Part 14: XML-Related Specifications (SQL/XML) (draft; PDF), JTC1SC32, 2011-08-06. List of further freely available Final Committee Drafts (search). Oracle 11g Total Recall Whitepaper (PDF), Oracle, 2009-09-01.

Worked examples

Example 1 — a first encounter with SQL:2011

Start with the simplest possible case. Write down what SQL:2011 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SQL:2011 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SQL:2011 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SQL:2011

In research
SQL:2011 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SQL:2011 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SQL:2011 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Declarative programming languages, Programming languages created in 2011, Query languages, so understanding it makes those chapters shorter.
In everyday life
Look for SQL:2011 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SQL:2011” →

How to study SQL:2011 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SQL:2011 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SQL:2011 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SQL:2011 in simple terms?

SQL:2011 or ISO/IEC 9075:2011 (under the general title "Information technology – Database languages – SQL") is the seventh revision of the ISO (1987) and ANSI (1986) standard for the SQL database query language. It was formally adopted in December 2011.

Why does SQL:2011 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SQL:2011?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SQL:2011.

Tags

  • Declarative programming languages
  • Programming languages created in 2011
  • Query languages
  • SQL

Keep exploring