Design SQL deviates in several ways from its theoretical foundation, the relational model and its tuple calculus. In that model, a table is a
set of tuples, while in SQL, tables and query results are
lists of rows; the same row may occur multiple times, and the order of rows can be employed in queries (e.g., in the LIMIT clause). Critics argue that SQL should be replaced with a language that returns strictly to the original foundation: for example, see
The Third Manifesto by Hugh Darwen and C.J. Date (2006, ).
Orthogonality and completeness Early specifications did not support major features, such as primary keys. Result sets could not be named, and subqueries had not been defined. These were added in 1992.
Null The concept of Null (SQL)| is the subject of some
debate. The Null marker indicates the absence of a value, and is distinct from a value of 0 for an integer column or an empty string for a text column. The concept of Nulls enforces the
3-valued-logic in SQL, which is a concrete implementation of the general
3-valued logic.
Duplicates Another popular criticism is that it allows duplicate rows, making integration with languages such as
Python, whose data types might make accurately representing the data difficult, in terms of parsing and by the absence of modularity. This is usually avoided by declaring a primary key, or a unique constraint, with one or more columns that uniquely identify a row in the table.
Impedance mismatch In a sense similar to
object–relational impedance mismatch, a mismatch occurs between the declarative SQL language and the procedural languages in which SQL is typically embedded. ==SQL data types==