Structured Query Language (SQL) is an evolving spec. The minimum standard a system needs to support to claim it is a SQL database is SQL-92.
SQL is based on bags (unordered set with duplicates) instead of sets (unordered set).
SQL essentially provides:
The example DB uses have 3 relations:
functions that return a single value from a bag of tuples:
SELECT AVG(gpa), cid FROM STUDENT; ⇒ cid output is undefined!Project tuples into subsets and calculate aggregates against each subset
Example: